CURL 工具查看外网IP
1. curl ifconfig.me 2. curl cip.cc 3. curl icanhazip.com 4. curl ident.me 5. curl ipecho.net/plain 6. curl whatismyip.akamai.com 7. curl tnx.nl/ip 8. curl myip.dnsomatic.com 9. curl ip.appspot.com 10. curl -s checkip.dyndns.org | sed 's/.*IP Address: \([0-9\.]*\).*/\1/g'
ip-api.com(推荐,速度快)ipecho.net(推荐)
ip.cn(不支持 curl)
ip-api.com 接口:
curl 'http://ip-api.com/json/?lang=zh-CN'
{ "status": "success", "country": "德国", "countryCode": "DE", "region": "HE", "regionName": "Hesse", "city": "法兰克福", "zip": "60313", "lat": 50.1188, "lon": 8.6843, "timezone": "Europe/Berlin", "isp": "Linode, LLC", "org": "Linode, LLC", "as": "AS63949 Linode, LLC", "query": "192.46.239.172" }
ipecho.net 接口:
curl ipecho.net/plain
111.22.222.33
cip.cc:
curl cip.cc
IP: 111.22.222.11 地址: 阿根廷 阿根廷 数据二: 新加坡 | XX云 数据三: 阿根廷 URL: http://www.cip.cc/111.22.222.11
标签:查看,cc,ip,外网,IP,curl,com,net From: https://www.cnblogs.com/fieldtianye/p/17867385.html