常用的查看公网IP的网址:
1. curl -L ip.cn
curl -L ip.cn
{“ip”: “122.97.220.99”, “country”: “江苏省”, “city”: “联通”}
也可以用这个
curl https://ip.cn
2. curl ifconfig.me
223.104.255.100
有时候会卡住
3.curl myip.ipip.net
当前 IP:223.104.255.100 来自于:中国 广东 广州 移动
4.curl cip.cc
IP : 223.104.255.100
地址 : 中国 广东 广州
运营商 : 移动
数据二 : 广东省广州市 | 移动
数据三 : 中国广东省广州市 | 移动
URL : http://www.cip.cc/223.104.255.100
5.curl http://members.3322.org/dyndns/getip
223.104.255.100
6.curl ip.sb
223.104.255.100
7.curl icanhazip.com
122.97.220.99
适合API访问获取外网IP
8.curl ipinfo.io/ip
用浏览器打开才行
9.curl ipecho.net/plain
122.97.220.99
10.curl www.trackip.net
用浏览器打开效果更好,不适合API调用