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.1.tar.gz (5.6 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.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wanip-2025.7.20.1.tar.gz
  • Upload date:
  • Size: 5.6 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.1.tar.gz
Algorithm Hash digest
SHA256 3df9357bc3052b13d509e8734ff94341bba41179530d43ff21c42eda68e38363
MD5 21af545301c11debe8d09fbdac44fc48
BLAKE2b-256 a8a52f4c1dee87ce408c88f1f672c1bfb7a4dab7aec0254b1c271aeff1fa6bfa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wanip-2025.7.20.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2ec8d43221266ba76fc0f5e425070986ae0bca02103e7aa6673efc05886112cd
MD5 b57fec300fdea8070826ab9fd5bc891c
BLAKE2b-256 7d4ba932644bcf41007a8dd45326b8db50c5aafb291da4748e3c8c90e542451d

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