mirror of
https://github.com/sirpdboy/sirpdboy-package.git
synced 2025-01-07 03:17:03 +08:00
up kpr 20210303
This commit is contained in:
parent
5cb34320d3
commit
84fa3139bb
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-koolproxyR
|
||||
PKG_VERSION:=3.8.5
|
||||
PKG_RELEASE:=1-20201126
|
||||
PKG_RELEASE:=1-20210303
|
||||
|
||||
PKG_MAINTAINER:=panda-mute <wxuzju@gmail.com>
|
||||
PKG_LICENSE:=GPLv3
|
||||
|
@ -32,7 +32,7 @@ else
|
||||
status = translate("<strong><font color=\"red\">广告过滤大师 Plus+ 已停止</font></strong>")
|
||||
end
|
||||
|
||||
o = Map("koolproxy", "<font color='green'>" .. translate("广告过滤大师 Plus+ ") .."</font>", "<font color='purple'>" .. translate( "广告过滤大师 Plus+能识别adblock规则的免费开源软件,追求体验更快、更清洁的网络,屏蔽烦人的广告!") .."</font>")
|
||||
o = Map("koolproxy", "<font color='green'>" .. translate("广告过滤大师 Plus+ ") .."</font>", "<font color='purple'>" .. translate( "广告过滤大师 Plus+是能识别Adblock规则的广告屏蔽软件,可以过滤网页广告、视频广告、HTTPS广告") .."</font>")
|
||||
|
||||
t = o:section(TypedSection, "global")
|
||||
t.anonymous = true
|
||||
@ -66,20 +66,15 @@ e:value(3, translate("视频模式"))
|
||||
e = t:taboption("base", MultiValue, "koolproxy_rules", translate("内置规则"))
|
||||
e.optional = false
|
||||
e.rmempty = false
|
||||
e:value("koolproxy.txt", translate("静态规则"))
|
||||
e:value("daily.txt", translate("每日规则"))
|
||||
e:value("kp.dat", translate("视频规则"))
|
||||
e:value("user.txt", translate("自定义规则"))
|
||||
|
||||
e = t:taboption("base", MultiValue, "thirdparty_rules", translate("第三方规则"))
|
||||
e.optional = true
|
||||
e.rmempty = false
|
||||
e:value("easylistchina.txt", translate("ABP规则"))
|
||||
e:value("fanboy.txt", translate("Fanboy规则"))
|
||||
e:value("yhosts.txt", translate("Yhosts规则"))
|
||||
e:value("anti-ad.txt", translate("Anti-AD规则"))
|
||||
e:value("koolproxy.txt", translate("静态规则"))
|
||||
e:value("daily.txt", translate("每日规则"))
|
||||
e:value("kp.dat", translate("视频规则"))
|
||||
e:value("mv.txt", translate("乘风视频"))
|
||||
|
||||
e:value("user.txt", translate("自定义规则"))
|
||||
|
||||
e = t:taboption("base", ListValue, "koolproxy_port", translate("端口控制"))
|
||||
e.default = 0
|
||||
@ -119,9 +114,9 @@ for t = 0,23 do
|
||||
e:value(t,translate("每天"..t.."点"))
|
||||
end
|
||||
e:value(nil, translate("关闭"))
|
||||
e.default = 2
|
||||
e.default = 0
|
||||
e.rmempty = false
|
||||
e.description = translate(string.format("<font color=\"red\"><strong>定时更新规则。请把时间修改掉,默认时间使用人数多会更新失败</strong></font>"))
|
||||
e.description = translate(string.format("<font color=\"red\"><strong>定时更新订阅规则与Adblock Plus Hosts</strong></font>"))
|
||||
|
||||
e = t:taboption("base", Button, "restart", translate("规则状态"))
|
||||
e.inputtitle = translate("更新规则")
|
||||
@ -402,7 +397,7 @@ function(o,a,i)
|
||||
end
|
||||
)
|
||||
|
||||
t=o:section(TypedSection,"usetips",translate("帮助支持"))
|
||||
t=o:section(TypedSection,"rss_rules",translate("技术支持"))
|
||||
t.anonymous = true
|
||||
t:append(Template("koolproxy/feedback"))
|
||||
return o
|
||||
|
@ -1,26 +1,15 @@
|
||||
config global
|
||||
option time_update '4'
|
||||
option time_update '5'
|
||||
option koolproxy_port '0'
|
||||
option startup_delay '0'
|
||||
option koolproxy_acl_default '1'
|
||||
option koolproxy_mode '1'
|
||||
option koolproxy_host '1'
|
||||
option koolproxy_rules 'koolproxy.txt daily.txt kp.dat user.txt'
|
||||
option thirdparty_rules 'anti-ad.txt'
|
||||
option enabled '0'
|
||||
option koolproxy_ipv6 '0'
|
||||
|
||||
config acl_rule
|
||||
option proxy_mode '2'
|
||||
option remarks '选要滤https的客户端'
|
||||
option ipaddr '192.168.1.100'
|
||||
option koolproxy_mode '1'
|
||||
option koolproxy_acl_default '0'
|
||||
option time_update 'nil'
|
||||
option enabled '0'
|
||||
option koolproxy_rules 'easylistchina.txt fanboy.txt yhosts.txt anti-ad.txt koolproxy.txt daily.txt kp.dat mv.txt user.txt'
|
||||
|
||||
config rss_rule
|
||||
option load '1'
|
||||
option name 'kpr_our_rule'
|
||||
option url 'https://raw.githubusercontent.com/project-lede/koolproxy/main/rules/kpr_our_rule.txt'
|
||||
|
||||
config usetips
|
||||
config rss_rules
|
||||
option load '0'
|
||||
option name '1'
|
||||
option url '1'
|
||||
|
@ -198,23 +198,39 @@ load_user_rules() {
|
||||
}
|
||||
|
||||
load_rules() {
|
||||
sed -i '1,9s/1/0/g' $KP_DIR/data/source.list
|
||||
sed -i '1,7s/1/0/g' $KP_DIR/data/source.list
|
||||
|
||||
local rulelist="$(uci -q get koolproxy.@global[0].koolproxy_rules)"
|
||||
for rule in $rulelist
|
||||
do
|
||||
case "$rule" in
|
||||
koolproxy.txt)
|
||||
yhosts.txt)
|
||||
sed -i '1s/0/1/g' $KP_DIR/data/source.list
|
||||
;;
|
||||
daily.txt)
|
||||
easylistchina.txt)
|
||||
sed -i '2s/0/1/g' $KP_DIR/data/source.list
|
||||
;;
|
||||
kp.dat)
|
||||
fanboy.txt)
|
||||
sed -i '3s/0/1/g' $KP_DIR/data/source.list
|
||||
;;
|
||||
user.txt)
|
||||
anti-ad.txt)
|
||||
sed -i '4s/0/1/g' $KP_DIR/data/source.list
|
||||
;;
|
||||
koolproxy.txt)
|
||||
sed -i '5s/0/1/g' $KP_DIR/data/source.list
|
||||
;;
|
||||
mv.txt)
|
||||
sed -i '6s/0/1/g' $KP_DIR/data/source.list
|
||||
;;
|
||||
daily.txt)
|
||||
sed -i '7s/0/1/g' $KP_DIR/data/source.list
|
||||
;;
|
||||
kp.dat)
|
||||
sed -i '8s/0/1/g' $KP_DIR/data/source.list
|
||||
;;
|
||||
user.txt)
|
||||
sed -i '9s/0/1/g' $KP_DIR/data/source.list
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -222,21 +238,7 @@ load_rules() {
|
||||
for rule in $rulelist
|
||||
do
|
||||
case "$rule" in
|
||||
yhosts.txt)
|
||||
sed -i '5s/0/1/g' $KP_DIR/data/source.list
|
||||
;;
|
||||
easylistchina.txt)
|
||||
sed -i '6s/0/1/g' $KP_DIR/data/source.list
|
||||
;;
|
||||
fanboy.txt)
|
||||
sed -i '7s/0/1/g' $KP_DIR/data/source.list
|
||||
;;
|
||||
anti-ad.txt)
|
||||
sed -i '8s/0/1/g' $KP_DIR/data/source.list
|
||||
;;
|
||||
mv.txt)
|
||||
sed -i '9s/0/1/g' $KP_DIR/data/source.list
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
1|koolproxy.txt||静态规则
|
||||
1|daily.txt||每日规则
|
||||
1|kp.dat||视频规则
|
||||
1|user.txt||自定义规则
|
||||
1|yhosts.txt||Yhosts规则
|
||||
1|easylistchina.txt||ABP规则
|
||||
1|fanboy.txt||Fanboy规则
|
||||
1|anti-ad.txt||Anti-AD规则
|
||||
1|mv.txt||乘风视频
|
||||
0|user.txt||自定义规则
|
||||
0|mv.txt|https://gitee.com/xinggsf/Adblock-Rule/raw/master/mv.txt|乘风视频
|
||||
0|kp.dat|https://raw.githubusercontent.com/houzi-/CDN/master/kp.dat|视频规则
|
||||
0|daily.txt|https://raw.githubusercontent.com/houzi-/CDN/master/daily.txt|每日规则
|
||||
0|koolproxy.txt|https://raw.githubusercontent.com/houzi-/CDN/master/koolproxy.txt|静态规则
|
||||
0|yhosts.txt|https://raw.githubusercontent.com/VeleSila/yhosts/master/hosts.txt|Yhosts规则
|
||||
0|fanboy.txt|https://raw.githubusercontent.com/ycg31/KoolProxy/master/rules/fanboy.txt|Fanboy规则
|
||||
0|easylistchina.txt|https://raw.githubusercontent.com/ycg31/KoolProxy/master/rules/easylistchina.txt|ABP规则
|
||||
0|anti-ad.txt|https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-easylist.txt|Anti-AD规则
|
||||
|
@ -111,28 +111,26 @@ update_rss_rules() {
|
||||
|
||||
update_rules() {
|
||||
echo $(date "+%F %T"): ------------------- 内置规则更新 ------------------- >>$LOGFILE
|
||||
wget 'https://raw.githubusercontent.com/project-lede/koolproxy/main/rules/kp.dat' -q -O $KP_DIR/data/rules/kp.dat
|
||||
wget 'https://raw.githubusercontent.com/project-lede/koolproxy/main/rules/daily.txt' -q -O $KP_DIR/data/rules/daily.txt
|
||||
wget 'https://raw.githubusercontent.com/project-lede/koolproxy/main/rules/koolproxy.txt' -q -O $KP_DIR/data/rules/koolproxy.txt
|
||||
wget 'https://raw.githubusercontent.com/project-lede/koolproxy/main/rules/yhosts.txt' -q -O $KP_DIR/data/rules/yhosts.txt
|
||||
wget 'https://raw.githubusercontent.com/project-lede/koolproxy/main/rules/fanboy.txt' -q -O $KP_DIR/data/rules/fanboy.txt
|
||||
wget 'https://raw.githubusercontent.com/project-lede/koolproxy/main/rules/easylistchina.txt' -q -O $KP_DIR/data/rules/easylistchina.txt
|
||||
wget 'https://raw.githubusercontent.com/project-lede/koolproxy/main/rules/antiad.txt' -q -O $KP_DIR/data/rules/anti-ad.txt
|
||||
wget 'https://raw.githubusercontent.com/project-lede/koolproxy/main/rules/mv.txt' -q -O $KP_DIR/data/rules/mv.txt
|
||||
wget 'https://raw.githubusercontent.com/project-lede/koolproxy/main/ipsetadblock/koolproxy_ipset.conf' -q -O $KP_DIR/koolproxy_ipset.conf
|
||||
wget 'https://raw.githubusercontent.com/project-lede/koolproxy/main/ipsetadblock/dnsmasq.adblock' -q -O $KP_DIR/dnsmasq.adblock
|
||||
yhosts_rules_local=`cat /usr/share/koolproxy/data/rules/yhosts.txt | sed -n '1p' | cut -d "=" -f2`
|
||||
easylist_rules_local=`cat /usr/share/koolproxy/data/rules/easylistchina.txt | sed -n '3p'|awk '{print $3,$4}'`
|
||||
wget 'https://raw.githubusercontent.com/houzi-/CDN/master/kp.dat' -q -O $KP_DIR/data/rules/kp.dat
|
||||
wget 'https://raw.githubusercontent.com/houzi-/CDN/master/daily.txt' -q -O $KP_DIR/data/rules/daily.txt
|
||||
wget 'https://raw.githubusercontent.com/houzi-/CDN/master/koolproxy.txt' -q -O $KP_DIR/data/rules/koolproxy.txt
|
||||
wget 'https://raw.githubusercontent.com/VeleSila/yhosts/master/hosts.txt' -q -O $KP_DIR/data/rules/yhosts.txt
|
||||
wget 'https://raw.githubusercontent.com/ycg31/KoolProxy/master/rules/fanboy.txt' -q -O $KP_DIR/data/rules/fanboy.txt
|
||||
wget 'https://raw.githubusercontent.com/ycg31/KoolProxy/master/rules/easylistchina.txt' -q -O $KP_DIR/data/rules/easylistchina.txt
|
||||
wget 'https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-easylist.txt' -q -O $KP_DIR/data/rules/anti-ad.txt
|
||||
wget 'https://gitee.com/xinggsf/Adblock-Rule/raw/master/mv.txt' -q -O $KP_DIR/data/rules/mv.txt
|
||||
easylist_rules_local=`cat /usr/share/koolproxy/data/rules/easylistchina.txt | sed -n '3p'|awk '{print $3,$4}'`
|
||||
fanboy_rules_local=`cat /usr/share/koolproxy/data/rules/fanboy.txt | sed -n '3p'|awk '{print $3,$4}'`
|
||||
antiad_rules_local=`cat /usr/share/koolproxy/data/rules/anti-ad.txt | sed -n '2p' | cut -d "=" -f2`
|
||||
yhosts_rules_local=`cat /usr/share/koolproxy/data/rules/yhosts.txt | sed -n '1p' | awk '{print $3,$4}'`
|
||||
antiad_rules_local=`cat /usr/share/koolproxy/data/rules/anti-ad.txt | sed -n '2p' | awk '{print $2,$3}'`
|
||||
koolproxy_rules_local=`cat /usr/share/koolproxy/data/rules/koolproxy.txt | sed -n '3p'|awk '{print $3,$4}'`
|
||||
mv_rules_local=`cat /usr/share/koolproxy/data/rules/mv.txt | sed -n '3p'|awk '{print $3,$4}'`
|
||||
echo $(date "+%F %T"): -------------------Yhosts规则 version $yhosts_rules_local >>$LOGFILE
|
||||
echo $(date "+%F %T"): -------------------ABP规则 version $easylist_rules_local >>$LOGFILE
|
||||
echo $(date "+%F %T"): -------------------Fanboy规则 version $fanboy_rules_local >>$LOGFILE
|
||||
echo $(date "+%F %T"): -------------------Antiad规则 version $antiad_rules_local >>$LOGFILE
|
||||
echo $(date "+%F %T"): -------------------静态规则 version $koolproxy_rules_local >>$LOGFILE
|
||||
echo $(date "+%F %T"): -------------------乘风视频 version $mv_rules_local >>$LOGFILE
|
||||
echo $(date "+%F %T"): -------------------ABP规则 Version $easylist_rules_local >>$LOGFILE
|
||||
echo $(date "+%F %T"): -------------------Fanboy规则 Version $fanboy_rules_local >>$LOGFILE
|
||||
echo $(date "+%F %T"): -------------------Yhosts规则 Version $yhosts_rules_local >>$LOGFILE
|
||||
echo $(date "+%F %T"): -------------------Anti-AD规则 Version $antiad_rules_local >>$LOGFILE
|
||||
echo $(date "+%F %T"): -------------------静态规则 Version $koolproxy_rules_local >>$LOGFILE
|
||||
echo $(date "+%F %T"): -------------------乘风视频 Version $mv_rules_local >>$LOGFILE
|
||||
echo $(date "+%F %T"): ------------------- 内置规则更新成功! ------------------- >>$LOGFILE
|
||||
RESTART_KOOLPROXY=true
|
||||
|
||||
|
@ -20,17 +20,20 @@ LUCI_DEPENDS:=+pdnsd-alt \
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_flow-offload
|
||||
bool "Include Flow Offload"
|
||||
depends on PACKAGE_$(PKG_NAME)_INCLUDE_shortcut-fe=n
|
||||
default y
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_shortcut-fe
|
||||
bool "Include Shortcut-FE"
|
||||
depends on PACKAGE_$(PKG_NAME)_INCLUDE_flow-offload=n
|
||||
default y if LINUX_4_9
|
||||
default n
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_flow-offload
|
||||
bool "Include Flow Offload"
|
||||
depends on !LINUX_4_9
|
||||
default y
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_bbr-cca
|
||||
bool "Include BBR CCA"
|
||||
default n if LINUX_4_9
|
||||
default y
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_dnsforwarder
|
||||
|
@ -8,7 +8,6 @@ function index()
|
||||
page = entry({"admin", "network", "turboacc"}, cbi("turboacc"), _("Turbo ACC Center"), 101)
|
||||
page.i18n = "turboacc"
|
||||
page.dependent = true
|
||||
page.acl_depends = { "luci-app-turboacc" }
|
||||
|
||||
entry({"admin", "network", "turboacc", "status"}, call("action_status"))
|
||||
end
|
||||
@ -26,6 +25,7 @@ local function fullconebat_status()
|
||||
end
|
||||
|
||||
local function dnscaching_status()
|
||||
return luci.sys.call("pgrep dnscache >/dev/null") == 0
|
||||
end
|
||||
|
||||
function action_status()
|
||||
|
Loading…
Reference in New Issue
Block a user