From b8c65b2942c47dd26422f94ffac37cc8ba44ca8f Mon Sep 17 00:00:00 2001 From: Ben Dowling Date: Mon, 16 Nov 2015 21:20:00 -0800 Subject: [PATCH] Simplify http://ipinfo.io lookup ``` $ curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}' 98.248.33.195 $ curl -s -4 ipinfo.io/ip 98.248.33.195 ``` --- shadowsocks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks.sh b/shadowsocks.sh index 1495d56..5755e13 100644 --- a/shadowsocks.sh +++ b/shadowsocks.sh @@ -132,7 +132,7 @@ function pre_install(){ echo "Getting Public IP address, Please wait a moment..." IP=$(curl -s -4 icanhazip.com) if [[ "$IP" = "" ]]; then - IP=$(curl -s -4 ipinfo.io | grep "ip" | awk -F\" '{print $4}') + IP=$(curl -s -4 ipinfo.io/ip) fi echo -e "Your main public IP is\t\033[32m$IP\033[0m" echo ""