获取出口IP地址

Posted kcxg

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了获取出口IP地址相关的知识,希望对你有一定的参考价值。

curl https://www.ipaddress.com/ |grep "My IPv4 Address"   # 推荐
curl icanhazip.com
curl www.trackip.net/i|grep "<span>"
curl ifconfig.me
curl ifconfig.me/all.xml  # xml格式
curl ipinfo.io/ip
curl ipinfo.io/json  # json格式,包含地理位置信息
curl ifconfig.me/all.json  # json格式 含forwarded字段
curl www.trackip.net/ip?json  # json格式 含时间
curl ipecho.net/plain  # 部分地方不能访问
# 使用wget
wget http://ipecho.net/plain -O - -q ; echo

 

以上是关于获取出口IP地址的主要内容,如果未能解决你的问题,请参考以下文章