Update github mirror

This commit is contained in:
sbwml 2022-04-12 16:29:46 +08:00
parent 2c3d55cdf5
commit 238a873305
2 changed files with 10 additions and 8 deletions

View File

@ -7,6 +7,7 @@ if [ "$(ifconfig | grep -c wan)" = 0 ]; then
exit 0
fi
if [ $1 ]; then
if [[ "$(getdns 0)" =~ ^127\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
getdns "$1" inactive
elif [[ "$(getdns "$1")" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
@ -14,3 +15,4 @@ elif [[ "$(getdns "$1")" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
else
bakdns "$1"
fi
fi

View File

@ -14,9 +14,9 @@ exist() {
getdat() {
if exist curl; then
curl -fSLo "$TMPDIR/$1" "https://github.sbwml.repl.co/https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/$1"
curl -fSLo "$TMPDIR/$1" "https://github.cooluc.com/https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/$1"
else
wget "https://github.sbwml.repl.co/https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/$1" -nv -O "$TMPDIR/$1"
wget "https://github.cooluc.com/https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/$1" -nv -O "$TMPDIR/$1"
fi
}