Skip to main content

跨平台 IP 地址查询工具

Project description

ipdisp

跨平台 IP 地址查询工具,支持本地 IP、公网 IP、IP 归属地查询、DNS 检测、网络连通性、域名解析等功能。

功能特性

  • 📍 本地 IP - 获取本机 IPv4/IPv6 地址
  • 🌐 公网 IP - 查询出口公网 IP
  • DNS 检测 - 并行检测多个 DNS 服务器可用性
  • 🔗 网络连通性 - 检测主流网站可达性
  • 🔍 域名解析 - DNS 域名解析
  • 📦 完整检测 - 一键检测所有网络状态

安装

方式1: 通过 pip 安装 (推荐)

pip install ipdisp

方式2: 升级到最新版本

pip install --upgrade ipdisp

方式3: 本地开发安装

# 克隆仓库
git clone https://github.com/yourusername/ipdisp.git
cd ipdisp

# 安装依赖
pip install -e .

# 或使用 uv 安装
uv pip install -e .

使用

# 查看本地IP (IPv4/IPv6)
ipdisp local
ipdisp local --json

# 查看公网IP
ipdisp public
ipdisp public --json

# 检测DNS服务器 (并行检测,速度更快)
ipdisp dns
ipdisp dns --json

# 检测网络连通性
ipdisp connect
ipdisp connect --json

# 域名解析
ipdisp resolve github.com
ipdisp resolve baidu.com --json

# 完整检测 (检测所有网络状态)
ipdisp all
ipdisp all --json

选项

选项 说明
-j, --json JSON 格式输出
-v, --version 查看版本
-h, --help 查看帮助

依赖

  • Python 3.8+
  • requests >= 2.28.0

平台支持

  • ✅ macOS
  • ✅ Linux
  • ✅ Windows

LICENSE

MIT License

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

ipdisp-1.2.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

ipdisp-1.2.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file ipdisp-1.2.0.tar.gz.

File metadata

  • Download URL: ipdisp-1.2.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for ipdisp-1.2.0.tar.gz
Algorithm Hash digest
SHA256 a8c0ad220a8d023c3df2dda4be59940dfa565e6147a604c165d73c84c98bff64
MD5 a7f78ea71b0a6400c6564b051d086fe9
BLAKE2b-256 4b8bad75f0eb4c02e4ed837f51ed1e37e3388bcccef51c57d10e45f2fe845c41

See more details on using hashes here.

File details

Details for the file ipdisp-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: ipdisp-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for ipdisp-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6aa59b08a1ca543c8a05ca2d731b29bb5dd7c01a8681632254e7287cd4148e0b
MD5 b9866ee1eee96ea5854194582e583194
BLAKE2b-256 f4f00666f7ed61d078aac0888047fcf9927e06949e322d46d4203f23df77a08f

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