获取出口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
原文地址:https://www.cnblogs.com/kcxg/p/11473796.html