apple-cn
This commit is contained in:
parent
f421ee63ba
commit
e5da149001
BIN
root/.DS_Store
vendored
Normal file
BIN
root/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
root/etc/.DS_Store
vendored
Normal file
BIN
root/etc/.DS_Store
vendored
Normal file
Binary file not shown.
@ -82,6 +82,7 @@ plugin:
|
|||||||
args:
|
args:
|
||||||
domain:
|
domain:
|
||||||
- "ext:/usr/share/v2ray/geosite.dat:cn"
|
- "ext:/usr/share/v2ray/geosite.dat:cn"
|
||||||
|
- "ext:/usr/share/v2ray/geosite.dat:apple-cn"
|
||||||
|
|
||||||
- tag: query_is_non_local_domain
|
- tag: query_is_non_local_domain
|
||||||
type: query_matcher
|
type: query_matcher
|
||||||
|
@ -19,6 +19,14 @@ getdat() {
|
|||||||
fi
|
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() {
|
getdns() {
|
||||||
if [ "$2" == "inactive" ]; then
|
if [ "$2" == "inactive" ]; then
|
||||||
ubus call network.interface.wan status | jsonfilter -e "@['inactive']['dns-server'][$1]"
|
ubus call network.interface.wan status | jsonfilter -e "@['inactive']['dns-server'][$1]"
|
||||||
|
@ -19,7 +19,7 @@ rm -rf "$TMPDIR"
|
|||||||
syncconfig=$(uci -q get mosdns.mosdns.syncconfig)
|
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
|
||||||
getdat def_config.yaml
|
get_config def_config.yaml
|
||||||
getdat serverlist.txt
|
getdat 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
|
||||||
|
Loading…
Reference in New Issue
Block a user