diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..c5848fe Binary files /dev/null and b/.DS_Store differ diff --git a/root/.DS_Store b/root/.DS_Store new file mode 100644 index 0000000..6b13736 Binary files /dev/null and b/root/.DS_Store differ diff --git a/root/etc/.DS_Store b/root/etc/.DS_Store new file mode 100644 index 0000000..e3fc4b2 Binary files /dev/null and b/root/etc/.DS_Store differ diff --git a/root/etc/mosdns/def_config.yaml b/root/etc/mosdns/def_config.yaml index 36c8c31..52631ef 100644 --- a/root/etc/mosdns/def_config.yaml +++ b/root/etc/mosdns/def_config.yaml @@ -82,6 +82,7 @@ plugin: args: domain: - "ext:/usr/share/v2ray/geosite.dat:cn" + - "ext:/usr/share/v2ray/geosite.dat:apple-cn" - tag: query_is_non_local_domain type: query_matcher diff --git a/root/etc/mosdns/library.sh b/root/etc/mosdns/library.sh index d9cc81d..065ba2e 100755 --- a/root/etc/mosdns/library.sh +++ b/root/etc/mosdns/library.sh @@ -19,6 +19,14 @@ getdat() { fi } +get_config() { + if exist curl; then + curl -fSLo "$TMPDIR/$1" "https://raw.cooluc.com/sbwml/luci-app-mosdns/master/root/etc/mosdns/$1" + else + wget "https://raw.cooluc.com/sbwml/luci-app-mosdns/master/root/etc/mosdns/$1" -nv -O "$TMPDIR/$1" + fi +} + getdns() { if [ "$2" == "inactive" ]; then ubus call network.interface.wan status | jsonfilter -e "@['inactive']['dns-server'][$1]" diff --git a/root/etc/mosdns/mosupdater.sh b/root/etc/mosdns/mosupdater.sh index 4e73c05..c796220 100755 --- a/root/etc/mosdns/mosupdater.sh +++ b/root/etc/mosdns/mosupdater.sh @@ -19,7 +19,7 @@ rm -rf "$TMPDIR" syncconfig=$(uci -q get mosdns.mosdns.syncconfig) if [ "$syncconfig" -eq 1 ]; then TMPDIR=$(mktemp -d) || exit 2 - getdat def_config.yaml + get_config def_config.yaml getdat serverlist.txt if [ "$(grep -o .com "$TMPDIR"/serverlist.txt | wc -l)" -lt "1000" ]; then