From cedc143ffe834e4e592c4a2ebf77fe5c384fb6fd Mon Sep 17 00:00:00 2001 From: letmekillthemall <36294815+letmekillthemall@users.noreply.github.com> Date: Tue, 27 Oct 2020 17:54:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=8F=E8=94=BD=E6=89=80=E6=9C=89=E4=B8=BB?= =?UTF-8?q?=E6=B5=81=E7=9F=AD=E8=A7=86=E9=A2=91=20(#5651)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 屏蔽所有主流短视频 抖音、快手、西瓜等短视频统统屏蔽 * fix 屏蔽所有主流短视频 fix * fix 版本号 忘改版本号了 --- package/lean/luci-app-adbyby-plus/Makefile | 2 +- .../luasrc/model/cbi/adbyby/advanced.lua | 4 +-- .../luci-app-adbyby-plus/po/zh-cn/adbyby.po | 4 +-- .../root/etc/init.d/adbyby | 29 +++++++++++++++++-- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/package/lean/luci-app-adbyby-plus/Makefile b/package/lean/luci-app-adbyby-plus/Makefile index 72b46f68c..40ad1e9aa 100644 --- a/package/lean/luci-app-adbyby-plus/Makefile +++ b/package/lean/luci-app-adbyby-plus/Makefile @@ -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 diff --git a/package/lean/luci-app-adbyby-plus/luasrc/model/cbi/adbyby/advanced.lua b/package/lean/luci-app-adbyby-plus/luasrc/model/cbi/adbyby/advanced.lua index b8991d06f..220943efb 100644 --- a/package/lean/luci-app-adbyby-plus/luasrc/model/cbi/adbyby/advanced.lua +++ b/package/lean/luci-app-adbyby-plus/luasrc/model/cbi/adbyby/advanced.lua @@ -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 diff --git a/package/lean/luci-app-adbyby-plus/po/zh-cn/adbyby.po b/package/lean/luci-app-adbyby-plus/po/zh-cn/adbyby.po index dc27f32cb..f82a0b38c 100644 --- a/package/lean/luci-app-adbyby-plus/po/zh-cn/adbyby.po +++ b/package/lean/luci-app-adbyby-plus/po/zh-cn/adbyby.po @@ -125,8 +125,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 "内存运行模式" diff --git a/package/lean/luci-app-adbyby-plus/root/etc/init.d/adbyby b/package/lean/luci-app-adbyby-plus/root/etc/init.d/adbyby index 182f3bbb0..7fe29caba 100755 --- a/package/lean/luci-app-adbyby-plus/root/etc/init.d/adbyby +++ b/package/lean/luci-app-adbyby-plus/root/etc/init.d/adbyby @@ -34,7 +34,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() @@ -132,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 }