OC

Knowledge OS
登录 注册
全部话题 移民 创业 iOS Mac Objective-C Swift Android 招聘 求职

获取当前网络外网IP

Achmed
Achmed 发布于 2015年09月27日 | 更新于 2015年09月27日
无人欣赏。
#满足了一下自己的搜集癖,搜集了不少可以用来查询外网IP的网址和方法。
#国内某网站的接口,只返回IP
curl ip.6655.com/ip.aspx
curl whatismyip.akamai.com
#更多用法访问ifconfig.co
wget -qO - ifconfig.co
curl icanhazip.com
dig +short myip.opendns.com @resolver1.opendns.com
curl ident.me
curl v4.ident.me
curl v6.ident.me
#慢
curl curlmyip.com 
curl ifconfig.me
curl inet-ip.info
#返回IP和地区
curl ip.6655.com/ip.aspx?area=1
curl 1111.ip138.com/ic.asp
curl ip.cn
curl cip.cc
curl ipip.net
#需要翻x墙,只返回IP
curl ip.appspot.com
#参考 http://unix.stackexchange.com/questions/22615/how-can-i-get-my-external-ip-address-in-bash
#有人给了以下测试方法
wget https://raw.githubusercontent.com/rsp/scripts/master/externalip-benchmark
chmod a+x externalip-benchmark
./externalip-benchmark
共2条回复
楼长 ·
Achmed 回复于 2015年09月27日

吐槽,复制的文本过来格式乱得1B。编辑了十几次。

2楼 ·
Achmed 回复于 2015年09月27日 | 更新于 2015年09月27日

curl ipip.net

登录 或者 注册

AltStyle によって変換されたページ (->オリジナル) /