允许使用 CURL:
ip.threep.top
ifconfig. io
ip.fm
cip.cc
myip.ipip.net
ip.sb
ifconfig.me
checkip.dyndns.com
api.myip.com
其他
ip.coderbusy.com
使用示例(Shell脚本):
#!/bin/sh
ip=$(curl -s https://api.ip.sb/ip)
echo "My IP address is: $ip"
nginx直接返回服务者IP配置:
location / {
default_type text/plain;
return 200 "$remote_addr\n" ;
}//如果显示的IP不正确,可能使用了防火墙cdn之类的,可以试试 把$remote_addr改成$http_x_forwarded_for
Comments | NOTHING