Curl 纯文本格式输出:
curl cip.cc
curl icanhazip.com
curl ident.me
curl ipecho.net/plain
curl whatismyip.akamai.com
curl tnx.nl/ip
curl myip.dnsomatic.com
curl ifconfig.me
curl ip.appspot.com
curl curlmyip.com
curl www.trackip.net/i
curl ipinfo.io/ip
curl -s checkip.dyndns.org | sed 's/.*IP Address: \([0-9\.]*\).*/\1/g'
脚本
#!/bin/bash
PUBLIC_IP=`wget http://ipecho.net/plain -O - -q ; echo`
echo $PUBLIC_IP