From f2d34e5551ceed46c4b8cdae084aef1248c8598b Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 9 Sep 2023 11:32:02 +0800 Subject: [PATCH] Update lib.sh --- scripts/lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib.sh b/scripts/lib.sh index b9dd41c5b..3a017460e 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -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" ];then +if [ ! -z "$cn" ] && [ "$?" != "0" ]; then LOCAL_ADDR=cn HTTP_PREFIX="https://ghproxy.com/" fi