#通过curl+httpd代理获得真实IP
IP=$(curl http://ip.6655.com/ip.aspx -x122.225.117.181:80)
echo "Your IP Is:$IP"
#获取完毕进行判断
if [[ $IP == 192.74.251.135 ]]; then
echo "Your IP is correct"
else
echo "IP not authorized"
exit
fi
转载于:https://blog.51cto.com/hekaihao/1791819