Update lib.sh

This commit is contained in:
midoks 2023-09-09 11:32:02 +08:00
parent 89c529f44c
commit f2d34e5551
1 changed files with 1 additions and 1 deletions

View File

@ -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