Update lib.sh

pull/397/head
midoks 2 years ago
parent 6f1e11e474
commit cad06425fc
  1. 2
      scripts/lib.sh

@ -53,7 +53,7 @@ LOCAL_ADDR=common
ping -c 1 ipinfo.io > /dev/null 2>&1 ping -c 1 ipinfo.io > /dev/null 2>&1
if [ "$?" == "0" ];then if [ "$?" == "0" ];then
CN=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") CN=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ -z $CN ];then if [ -z "$CN" ];then
LOCAL_ADDR=cn LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/" HTTP_PREFIX="https://ghproxy.com/"
fi fi

Loading…
Cancel
Save