Skip to content

Commit

Permalink
Merge pull request #524 from midoks/dev
Browse files Browse the repository at this point in the history
更换GitHub Proxy
  • Loading branch information
midoks authored Feb 8, 2024
2 parents 0eb8791 + 1018678 commit d5945fd
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion plugins/dynamic-tracking/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Install_App()
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
HTTP_PREFIX="https://"
if [ ! -z "$cn" ];then
HTTP_PREFIX="https://ghproxy.com/"
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi

# FlameGraph start
Expand Down
6 changes: 6 additions & 0 deletions plugins/mysql/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2598,6 +2598,10 @@ def trySlaveSyncBugfix(version=''):

gtid_purged = ''

var_slave_gtid = sdb.query('show VARIABLES like "%gtid_purged%"')
if len(var_slave_gtid) > 0:
gtid_purged += var_slave_gtid[0]['Value'] + ','

for i in range(len(slave_sync_data)):
port = slave_sync_data[i]['port']
password = slave_sync_data[i]['pass']
Expand All @@ -2617,6 +2621,8 @@ def trySlaveSyncBugfix(version=''):
if len(var_gtid) > 0:
gtid_purged += var_gtid[0]['Value'] + ','



gtid_purged = gtid_purged.strip(',')
sql = "set @@global.gtid_purged='" + gtid_purged + "'"

Expand Down
2 changes: 1 addition & 1 deletion plugins/op_waf/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Install_App(){
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
HTTP_PREFIX="https://"
if [ ! -z "$cn" ];then
HTTP_PREFIX="https://ghproxy.com/"
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi

# download GeoLite Data
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/lib/icu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/"
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi

if [ ! -d ${SERVER_ROOT}/icu ];then
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/lib/libiconv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/"
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi

if [ ! -d ${SERVER_ROOT}/libiconv ];then
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/lib/libzip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/"
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi
# HTTP_PREFIX="https://"

Expand Down
2 changes: 1 addition & 1 deletion plugins/php/lib/oniguruma.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SOURCE_ROOT=$rootPath/source/lib
HTTP_PREFIX="https://"
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
HTTP_PREFIX="https://ghproxy.com/"
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi

which onig-config
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/lib/openssl_10.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/"
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi

if [ ! -d ${SERVER_ROOT}/openssl10 ];then
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/lib/zlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/"
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi
# HTTP_PREFIX="https://"

Expand Down
4 changes: 2 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ fi
# ping -c 1 github.com > /dev/null 2>&1
# if [ "$?" != "0" ];then
# LOCAL_ADDR=cn
# HTTP_PREFIX="https://ghproxy.com/"
# HTTP_PREFIX="https://mirror.ghproxy.com/"
# fi

HTTP_PREFIX="https://"
LOCAL_ADDR=common
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/"
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi

echo "local:${LOCAL_ADDR}"
Expand Down
4 changes: 2 additions & 2 deletions scripts/install_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ fi
# ping -c 1 github.com > /dev/null 2>&1
# if [ "$?" != "0" ];then
# LOCAL_ADDR=cn
# HTTP_PREFIX="https://ghproxy.com/"
# HTTP_PREFIX="https://mirror.ghproxy.com/"
# fi

HTTP_PREFIX="https://"
LOCAL_ADDR=common
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/"
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi

echo "local:${LOCAL_ADDR}"
Expand Down
4 changes: 2 additions & 2 deletions scripts/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ fi
# ping -c 1 github.com > /dev/null 2>&1
# if [ "$?" != "0" ];then
# LOCAL_ADDR=cn
# HTTP_PREFIX="https://ghproxy.com/"
# HTTP_PREFIX="https://mirror.ghproxy.com/"
# fi
HTTP_PREFIX="https://"
LOCAL_ADDR=common
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/"
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi

PIPSRC="https://pypi.python.org/simple"
Expand Down
2 changes: 1 addition & 1 deletion scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ LOCAL_ADDR=common
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/"
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi
echo "local:${LOCAL_ADDR}"

Expand Down
4 changes: 2 additions & 2 deletions scripts/update_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ fi
# ping -c 1 github.com > /dev/null 2>&1
# if [ "$?" != "0" ];then
# LOCAL_ADDR=cn
# HTTP_PREFIX="https://ghproxy.com/"
# HTTP_PREFIX="https://mirror.ghproxy.com/"
# fi
HTTP_PREFIX="https://"
LOCAL_ADDR=common
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/"
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi

echo "local:${LOCAL_ADDR}"
Expand Down

0 comments on commit d5945fd

Please sign in to comment.