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.8.6.tar.gz (4.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.8.6-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wanip-2025.7.8.6.tar.gz
  • Upload date:
  • Size: 4.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.8.6.tar.gz
Algorithm Hash digest
SHA256 14516dbf5f004502087dcc40de0716c8cf8ba90ef8b8ed0d527b64aee671d67b
MD5 a2e8c0a85b731d9bfec990564ff6c8e2
BLAKE2b-256 58031bfaa71a46a6ada13b933ab0559dd6d756b86ca12f3ff27dbe6445d97dfe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wanip-2025.7.8.6-py3-none-any.whl
  • Upload date:
  • Size: 5.3 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.8.6-py3-none-any.whl
Algorithm Hash digest
SHA256 429dac17eb35c2464641205c24eb61a2bbbb046aea86b643ecb5b8afb151f92a
MD5 04e3525205f6a798133956658407d121
BLAKE2b-256 e3bda35f9c817e8081ffca540cf3ab4be18c50ba1790aa1b99d3811eb2190bb2

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