extip

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 10 Imported by: 0

README

extip - retrieve your external IP address via DNS

Small Golang package/cli that uses special DNS resolvers to return your external IP address.

By default it uses Google, OpenDNS, and Akamai. If there is a conflict between the resolver answers a message will be delivered on stderr with the conflicting values.

Alternatively, you can specify an extip server to use. See below for how to do that.

References

Build

just build # requires https://github.com/casey/just

Install

go install -ldflags "-s -w" github.com/hrbrmstr/extip@latest

Options

Lookup external IP address via DNS.

Defaults to using Akamai, OpenDNS, and Google services.
You can specify an extip server via the following command line options.
NOTE: Both server and domain should be specified to override default behavior.
More info about running an extip server can be found at <https://github.com/hrbrmstr/extip-svr>.

extip 0.2.0
Usage: extip [--server EXTIP_SERVER] [--domain DOMAIN] [--record-type RECORD_TYPE] [--port PORT]

Options:
  --server EXTIP_SERVER, -s EXTIP_SERVER
                         extip-svr IP/FQDN. e.g., ip.rudis.net [env: EXTIP_SERVER]
  --domain DOMAIN, -d DOMAIN
                         Domain to use for IP Lookup. e.g., myip.is [env: EXTIP_DOMAIN]
  --record-type RECORD_TYPE, -r RECORD_TYPE
                         DNS record type to lookup. One of TXT or A. [default: TXT, env: EXTIP_RECORD_TYPE]
  --port PORT, -p PORT   Port extip resolver is listening on. [default: 53, env: EXTIP_PORT]
  --help, -h             display this help and exit

Usage

Default:

extipsvr

Use an extip server:

extip -s ip.rudis.net -d ip.is

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL