{"id":22248932,"url":"https://github.com/purplebooth/whatismyip","last_synced_at":"2025-07-28T04:31:24.382Z","repository":{"id":37898422,"uuid":"377613013","full_name":"PurpleBooth/whatismyip","owner":"PurpleBooth","description":"Work out what your IP is (Mirror)","archived":false,"fork":false,"pushed_at":"2025-07-24T11:08:41.000Z","size":713,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-24T15:48:37.408Z","etag":null,"topics":["cli","what-is-my-ip"],"latest_commit_sha":null,"homepage":"https://codeberg.org/PurpleBooth/whatismyip","language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PurpleBooth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["PurpleBooth"],"patreon":null,"open_collective":null,"ko_fi":"billie","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-06-16T20:00:14.000Z","updated_at":"2025-07-24T11:08:46.000Z","dependencies_parsed_at":"2024-01-23T09:59:31.627Z","dependency_job_id":"24174729-e704-4b10-948e-b3d18ea62fc5","html_url":"https://github.com/PurpleBooth/whatismyip","commit_stats":null,"previous_names":[],"tags_count":123,"template":false,"template_full_name":null,"purl":"pkg:github/PurpleBooth/whatismyip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PurpleBooth%2Fwhatismyip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PurpleBooth%2Fwhatismyip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PurpleBooth%2Fwhatismyip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PurpleBooth%2Fwhatismyip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PurpleBooth","download_url":"https://codeload.github.com/PurpleBooth/whatismyip/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PurpleBooth%2Fwhatismyip/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267464017,"owners_count":24091491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","what-is-my-ip"],"created_at":"2024-12-03T06:20:14.078Z","updated_at":"2025-07-28T04:31:24.375Z","avatar_url":"https://github.com/PurpleBooth.png","language":"Rust","funding_links":["https://github.com/sponsors/PurpleBooth","https://ko-fi.com/billie"],"categories":[],"sub_categories":[],"readme":"# What is my IP\n\nA command-line utility for identifying both local and remote IP addresses of your machine.\n\n## Usage\n\n``` shell,script(name=\"help\",expected_exit_code=0)\nwhatismyip --help | sed 's/\\.exe//'\n```\n\n``` text,verify(script_name=\"help\",stream=stdout)\nWork out what your IP Address is\n\nUsage: whatismyip [OPTIONS]\n\nOptions:\n  -l, --only-local  Only print IP addresses local to this machine\n  -w, --only-wan    Only print IP addresses as seen by a remote service\n  -4, --only-4      Only print IPv4 addresses\n  -6, --only-6      Only print IPv6 addresses\n  -r, --reverse     Print the reverse DNS entries for the IP addresses\n  -h, --help        Print help\n  -V, --version     Print version\n```\n\nWhen executed, the tool displays your IP addresses:\n\n``` shell,script(name=\"demo\",expected_exit_code=0)\nwhatismyip\n```\n\n``` shell,skip()\n207.105.7.192\n192.168.1.56\n```\n\nThe output consists solely of IP addresses, one per line\n\n``` shell,script(name=\"test\",expected_exit_code=0)\nwhatismyip | grep -E '([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})|(([a-f0-9:]+:+)+[a-f0-9]+)'\n```\n\n``` shell,skip()\n207.105.7.192\n192.168.1.56\n```\n\n### IP Version Support\n\nBy default, the tool displays both IPv4 and IPv6 addresses if available:\n\n``` shell,script(name=\"v4-only-ip\",expected_exit_code=0)\nwhatismyip\n```\n\n``` shell,skip()\n207.105.7.192\n192.168.1.56\n2001:0db8:85a3:0000:0000:8a2e:0370:7334\nfe80::4\n```\n\n#### Filtering by IP Version\n\nYou can filter results to show only IPv6 addresses:\n\n``` shell,skip()\nwhatismyip -6\n```\n\n``` shell,skip()\n2001:0db8:85a3:0000:0000:8a2e:0370:7334\nfe80::4\n```\n\nOr only IPv4 addresses:\n\n``` shell,script(name=\"v4-only\",expected_exit_code=0)\nwhatismyip -4\n```\n\n``` shell,skip()\n207.105.7.192\n192.168.1.56\n```\n\n### Network Interface Filtering\n\n#### Local Network Interfaces Only\n\nTo display only IP addresses from your local network interfaces:\n\n``` shell,script(name=\"local-only\",expected_exit_code=0)\nwhatismyip -l\n```\n\n``` shell,skip()\n192.168.1.56\nfe80::4\n```\n\n#### WAN (External) IP Addresses Only\n\nTo display only your external IP addresses as seen by remote services:\n\n``` shell,script(name=\"wan-only\",expected_exit_code=0)\nwhatismyip -w\n```\n\n``` shell,skip()\n207.105.7.192\n2001:0db8:85a3:0000:0000:8a2e:0370:7334\n```\n\n### Reverse DNS Lookup\n\nThe tool can perform reverse DNS lookups to display the hostname associated with each IP address. This is particularly useful for identifying VPN exit points or verifying network configurations:\n\n``` shell,script(name=\"reverse\",expected_exit_code=0)\nwhatismyip -r\n```\n\n``` shell,skip()\n207.105.7.192 (5898c708dfaf.dip0.t-ipconnect.de.)\n2001:0db8:85a3:0000:0000:8a2e:0370:7334 (c06aa6b6af6c4ad5b46473d8d70bc068.dip0.t-ipconnect.de.)\n```\n\n## Installation\n\n### Pre-built Binaries\n\nPre-compiled binaries for Linux and macOS (x86_64) are available on the [releases page](https://codeberg.org/PurpleBooth/whatismyip/releases/latest).\n\n### Using Homebrew\n\nIf you use Homebrew, you can install the tool with:\n\n``` shell,skip()\nbrew install PurpleBooth/repo/whatismyip\n```\n\n## Technical Details\n\n### WAN IP Detection Mechanism\n\nThe tool determines your external IP address by querying a special DNS record that returns the client's IP address as seen by the DNS server. Specifically, it queries the `o-o.myaddr.l.google.com` TXT record on Google's DNS servers:\n\n- `ns1.google.com`\n- `ns2.google.com`\n- `ns3.google.com`\n- `ns4.google.com`\n\nYou can replicate this functionality manually using the [dig tool](https://en.wikipedia.org/wiki/Dig_(command)):\n\n``` shell,skip()\ndig TXT +short o-o.myaddr.l.google.com @ns1.google.com\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurplebooth%2Fwhatismyip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurplebooth%2Fwhatismyip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurplebooth%2Fwhatismyip/lists"}