luci-app-adbyby-plus: sync with upstream source

This commit is contained in:
Tianling Shen 2020-12-26 00:10:00 +08:00
parent 62556b3663
commit a2fa23c234
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
7 changed files with 31 additions and 10 deletions

View File

@ -10,7 +10,7 @@ LUCI_DEPENDS:=+adbyby +wget +ipset +dnsmasq-full
LUCI_PKGARCH:=all
PKG_NAME:=luci-app-adbyby-plus
PKG_VERSION:=2.0
PKG_RELEASE:=72
PKG_RELEASE:=73
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -22,8 +22,8 @@ o.title = translate("Block Apple iOS OTA update")
o.default = 0
o.rmempty = false
o = s:option(Flag, "block_douyin")
o.title = translate("Block Douyin APP and Website")
o = s:option(Flag, "block_cnshort")
o.title = translate("Block CNshort APP and Website")
o.default = 0
o.rmempty = false

View File

@ -112,8 +112,8 @@ msgstr "手动更新规则"
msgid "Block Apple iOS OTA update"
msgstr "拦截 Apple iOS 的OTA更新"
msgid "Block Douyin APP and Website"
msgstr "拦截 抖音 APP 和网站"
msgid "Block CNshort APP and Website"
msgstr "拦截 短视频 APP 和网站"
msgid "RAM Running Mode"
msgstr "内存运行模式"

View File

@ -36,7 +36,7 @@ get_config()
config_get wan_mode $1 wan_mode 1
config_get_bool block_ios $1 block_ios 0
config_get_bool mem_mode $1 mem_mode 1
config_get_bool block_douyin $1 block_douyin 0
config_get_bool block_cnshort $1 block_cnshort 0
}
add_rules()
@ -85,8 +85,6 @@ ip_rule()
esac
done
case $wan_mode in
0)
;;
@ -134,11 +132,34 @@ add_dns()
echo 'conf-dir=/tmp/adbyby/rules/data' >> /tmp/dnsmasq.d/dnsmasq-adbyby.conf
[ $block_ios -eq 1 ] && echo 'address=/mesu.apple.com/0.0.0.0' >> /tmp/dnsmasq.d/dnsmasq-adbyby.conf
if [ $block_douyin -eq 1 ]; then
cat <<-EOF >/tmp/etc/dnsmasq-adbyby.d/08-dnsmasq.douyin
if [ $block_cnshort -eq 1 ]; then
cat <<-EOF >/tmp/etc/dnsmasq-adbyby.d/08-dnsmasq.cnshort
address=/api.amemv.com/0.0.0.0
address=/.amemv.com/0.0.0.0
address=/.tiktokv.com/0.0.0.0
address=/.snssdk.com/0.0.0.0
address=/.douyin.com/0.0.0.0
address=/.ixigua.com/0.0.0.0
address=/.pstatp.com/0.0.0.0
address=/.ixiguavideo.com/0.0.0.0
address=/.v.kandian.qq.com/0.0.0.0
address=/.yximgs.com/0.0.0.0
address=/.gifshow.com/0.0.0.0
address=/.ksapisrv.com/0.0.0.0
address=/.kuaishoupay.com/0.0.0.0
address=/.ksyun.com/0.0.0.0
address=/.live.xycdn.com/0.0.0.0
address=/.danuoyi.alicdn.com/0.0.0.0
address=/.v.weishi.qq.com/0.0.0.0
address=/.pearvideo.com/0.0.0.0
address=/.miaopai.com/0.0.0.0
address=/.kuaishou.com/0.0.0.0
address=/.qupai.me/0.0.0.0
address=/.meipai.com/0.0.0.0
address=/.huoshan.com/0.0.0.0
address=/.ergengtv.com/0.0.0.0
address=/.baijiahao.baidu.com/0.0.0.0
address=/.xiongzhang.baidu.com/0.0.0.0
EOF
fi
}

View File

View File