得到服务器出口ip的n个方法

curl ifconfig.mecurl ip.bsd-unix.netcurl icanhazip.comcurl ipinfo.io/ipwget -qO- ipinfo.io/iplynx -source ipinfo.io/ipwget -O – -q icanhazip.comcurl -s http://whatismyip.akamai.com/curl -s https://4.ifcfg.me/nc 4.ifcfg.me 23 | grep IPv4 | cut -d’ ‘ -f4telnet 4.ifcfg.me 2>&1 | grep IPv4 | cut -d’ ‘ -f4echo close | ftp 4.ifcfg.me | awk ‘{print $4; exit}’ 下面是个测试各种方法的速度脚本,最后有排名:wget https://moneyslow.com/bin/externalip-benchmarkchmod a+x externalip-benchmark./externalip-benchmark 测试结果: 其他文章: