pull/449/head
midoks 2 years ago
parent 74e63c5bbd
commit 33493ac03c
  1. 4
      scripts/install.sh
  2. 2
      scripts/install_dev.sh
  3. 2
      scripts/lib.sh

@ -64,10 +64,10 @@ fi
# HTTP_PREFIX="https://ghproxy.com/"
# fi
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
HTTP_PREFIX="https://"
LOCAL_ADDR=common
if [ ! -z "$cn" ] && [ "$?" != "0" ] ;then
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" != "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/"
fi

@ -71,7 +71,7 @@ fi
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
HTTP_PREFIX="https://"
LOCAL_ADDR=common
if [ ! -z "$cn" ] && [ "$?" != "0" ];then
if [ ! -z "$cn" ] || [ "$?" != "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/"
fi

@ -68,7 +68,7 @@ fi
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
HTTP_PREFIX="https://"
LOCAL_ADDR=common
if [ ! -z "$cn" ] && [ "$?" != "0" ]; then
if [ ! -z "$cn" ] || [ "$?" != "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/"
fi

Loading…
Cancel
Save