Loyalsoldier/v2ray-rules-dat geoip & geosite

This commit is contained in:
sbwml 2022-04-07 21:22:22 +08:00
parent e5da149001
commit b50aad8adf
5 changed files with 9 additions and 1 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
root/.DS_Store vendored

Binary file not shown.

BIN
root/etc/.DS_Store vendored

Binary file not shown.

View File

@ -12,6 +12,14 @@ exist() {
} }
getdat() { 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 if exist curl; then
curl -fSLo "$TMPDIR/$1" "https://raw.cooluc.com/QiuSimons/openwrt-mos/master/dat/$1" curl -fSLo "$TMPDIR/$1" "https://raw.cooluc.com/QiuSimons/openwrt-mos/master/dat/$1"
else else

View File

@ -20,7 +20,7 @@ syncconfig=$(uci -q get mosdns.mosdns.syncconfig)
if [ "$syncconfig" -eq 1 ]; then if [ "$syncconfig" -eq 1 ]; then
TMPDIR=$(mktemp -d) || exit 2 TMPDIR=$(mktemp -d) || exit 2
get_config def_config.yaml get_config def_config.yaml
getdat serverlist.txt get_ADlist serverlist.txt
if [ "$(grep -o .com "$TMPDIR"/serverlist.txt | wc -l)" -lt "1000" ]; then if [ "$(grep -o .com "$TMPDIR"/serverlist.txt | wc -l)" -lt "1000" ]; then
rm -rf "$TMPDIR"/serverlist.txt rm -rf "$TMPDIR"/serverlist.txt