Get your external IP address from command line - STUN, DNS, HTTPS API supported.
Basic Usage
$ myip
2001:db8::2
$ myip -4
192.0.2.2
$ myip -6
2001:db8::2STUN
- This is the default method
stun.l.google.com:19302is the default server- Connection over UDP only
myip --method STUN --server stun.l.google.com:19302ip.sb HTTPS API
myip --method ip.sbOpenDNS DNS Query
myip --method OpenDNSOpenDNS HTTPS API
-4/-6doesn't work
myip --method OpenDNS-APIBuilding
Use go 1.11 or higher. Run build.sh to build it and collect your binary file in build directory.
from https://github.com/Jamesits/myip
No comments:
Post a Comment