Loyalsoldier/v2ray-rules-dat geoip & geosite
This commit is contained in:
parent
e5da149001
commit
b50aad8adf
BIN
root/.DS_Store
vendored
BIN
root/.DS_Store
vendored
Binary file not shown.
BIN
root/etc/.DS_Store
vendored
BIN
root/etc/.DS_Store
vendored
Binary file not shown.
@ -12,6 +12,14 @@ exist() {
|
||||
}
|
||||
|
||||
getdat() {
|
||||
if exist curl; then
|
||||
curl -fSLo "$TMPDIR/$1" "https://ghproxy.com/https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/$1"
|
||||
else
|
||||
wget "https://ghproxy.com/https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/$1" -nv -O "$TMPDIR/$1"
|
||||
fi
|
||||
}
|
||||
|
||||
get_ADlist() {
|
||||
if exist curl; then
|
||||
curl -fSLo "$TMPDIR/$1" "https://raw.cooluc.com/QiuSimons/openwrt-mos/master/dat/$1"
|
||||
else
|
||||
|
@ -20,7 +20,7 @@ syncconfig=$(uci -q get mosdns.mosdns.syncconfig)
|
||||
if [ "$syncconfig" -eq 1 ]; then
|
||||
TMPDIR=$(mktemp -d) || exit 2
|
||||
get_config def_config.yaml
|
||||
getdat serverlist.txt
|
||||
get_ADlist serverlist.txt
|
||||
|
||||
if [ "$(grep -o .com "$TMPDIR"/serverlist.txt | wc -l)" -lt "1000" ]; then
|
||||
rm -rf "$TMPDIR"/serverlist.txt
|
||||
|
Loading…
Reference in New Issue
Block a user