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
Metadata
Release files for ipdisp 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ipdisp-1.2.0.tar.gz | 6.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ipdisp-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.5 kB
Release files / ipdisp-1.2.0.tar.gz
| Download URL | ipdisp-1.2.0.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8c0ad220a8d023c3df2dda4be59940dfa565e6147a604c165d73c84c98bff64
|
|
BLAKE2b-256 checksum How to use checksums |
4b8bad75f0eb4c02e4ed837f51ed1e37e3388bcccef51c57d10e45f2fe845c41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.17
|
Release files / ipdisp-1.2.0-py3-none-any.whl
| Download URL | ipdisp-1.2.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6aa59b08a1ca543c8a05ca2d731b29bb5dd7c01a8681632254e7287cd4148e0b
|
|
BLAKE2b-256 checksum How to use checksums |
f4f00666f7ed61d078aac0888047fcf9927e06949e322d46d4203f23df77a08f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.17
|
Security for ipdisp 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.