The clients show your public IPv4 and IPv6 addresses, country, and ASN. They also try usable local source addresses to detect additional public routes.
The shell client requires curl and standard Unix networking tools.
- Download
myip.sh:
curl -fLO https://raw.githubusercontent.com/macvk/myip/master/myip.sh
chmod +x myip.sh- Run it:
./myip.shThe Python client requires Python 3 and uses only the standard library.
curl -fLO https://raw.githubusercontent.com/macvk/myip/master/myip.py
python3 myip.pyOn Windows, run python myip.py.
The Go client uses only the standard library.
curl -fLO https://raw.githubusercontent.com/macvk/myip/master/myip.go
go build -o myip myip.go
./myipOn Windows:
go build -o myip.exe myip.go
myip.exeThe batch client requires Windows PowerShell and curl.exe.
powershell -command "& { (New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/macvk/myip/master/myip.bat', 'myip.bat') }"myip.bat