Skip to main content

Determine your WAN IP

Project description

Determine your WAN IP, using publicly available providers

Example usage

$ wanip -h
usage: wanip [-h] [-p PROVIDER] [-4 | -6] [-v]

Ask a provider for your ip with which you connect to it, then print it out

options:
  -h, --help            show this help message and exit
  -p, --provider PROVIDER
                        the provider to contact, instead of pseudo-randomly auto-selecting one from a pre-built
                        internal list (default: None)
  -4, --ipv4            force the usage of IPv4 (default: False)
  -6, --ipv6            force the usage of IPv6 (default: False)
  -v, --verbose         used once: show which provider will be contacted; used twice (or more often):
                        display contactable providers as well (i.e., the pre-built internal list) (default: 0)

Respect the netiquette when contacting the provider.
$ wanip -4
80.167.65.60
$ wanip -6vv
https://api.ipify.org
https://checkip.amazonaws.com
https://eth0.me/
https://icanhazip.com
https://ident.me
https://ifconfig.co
https://ifconfig.me/ip
https://ip.me
https://ipapi.co/ip
https://ipecho.net/plain
https://ipinfo.io/ip
https://iprs.fly.dev
https://l2.io/ip
https://my.ip.fi
https://wgetip.com
https://whatismyip.akamai.com
https://www.trackip.net/ip
Trying https://ifconfig.me/ip
2a01:599:b44:be52:9f91:3767:2b2f:cd93

Installation

The project is on PyPI, so simply run

$ python -m pip install wanip

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wanip-2025.7.20.2.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wanip-2025.7.20.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file wanip-2025.7.20.2.tar.gz.

File metadata

  • Download URL: wanip-2025.7.20.2.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for wanip-2025.7.20.2.tar.gz
Algorithm Hash digest
SHA256 0af4d4d5e8f948a991f2db48e17f1be5e09f2f32af6b59f7fb87849ac37c46e3
MD5 9638e535ac0dc70733a8da2260240191
BLAKE2b-256 f83b1d19cbbcdfe825130f402c3fa5867b61ec84a686b6aa4359cc2dbcf1dbcf

See more details on using hashes here.

File details

Details for the file wanip-2025.7.20.2-py3-none-any.whl.

File metadata

  • Download URL: wanip-2025.7.20.2-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for wanip-2025.7.20.2-py3-none-any.whl
Algorithm Hash digest
SHA256 81ca8a6c144a89980470be9a795b1a646905fb336f1a59d78d6ed3c3335f9d42
MD5 5a1a02bcc06047a69294b93e1390a03d
BLAKE2b-256 636e72169cd948f747ea8abc4f95da440eedbfbe98abfdbb583a7892c0ba3ba2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page