1.总结
- 1.【强力推荐】 ipw.cn 。 此网站为中文,除了查ip,还有额外功能
# 查询本机外网IPv4地址
curl 4.ipw.cn
# 查询本机外网IPv6地址
curl 6.ipw.cn
# 测试网络是IPv4还是IPv6访问优先(访问IPv4/IPv6双栈站点,如果返回IPv6地址,则IPv6访问优先)
curl test.ipw.cn
- 更多网址
序号 | 网址 | ip | json | xml | 备注 |
---|---|---|---|---|---|
2 | 【推荐】 https://ifconfig.me | curl ifconfig.me curl ifconfig.me/ip | curl ifconfig.me/all.json | curl ifconfig.me/all.xml | |
3 | 【推荐】 https://ipinfo.io | curl ipinfo.io/ip | curl ipinfo.io curl ipinfo.io/json | 官网文档 https://ipinfo.io/developers | |
4 | https://ipecho.net | curl ipecho.net/ip curl ipecho.net/plain | 跳转ipinfo.io | ||
5 | https://www.trackip.net | curl trackip.net/ip | curl trackip.net/json curl trackip.net/ip?json | ||
6 | https://icanhazip.com | curl icanhazip.com |
2.示例
通过客户端发请求,如浏览器/curl/postman/apipost/apifox/httpClient
curl 4.ipw.cn
curl ifconfig.me/ip