update-11.05
This commit is contained in:
parent
d1cb981e28
commit
e77615aa8f
|
@ -4,15 +4,51 @@ PKG_NAME:=luci-app-godproxy
|
|||
PKG_VERSION:=3.8.5
|
||||
PKG_RELEASE:=3-20211105
|
||||
|
||||
PKG_MAINTAINER:=panda-mute <wxuzju@gmail.com>
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
LUCI_TITLE:=LuCI support for koolproxy
|
||||
LUCI_PKGARCH:=all
|
||||
LUCI_DEPENDS:=@TARGET_x86_64 +openssl-util +ipset +dnsmasq-full +@BUSYBOX_CONFIG_DIFF +iptables-mod-nat-extra +wget
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/config/koolproxy
|
||||
/usr/share/koolproxy/data/rules/
|
||||
define Package/luci-app-godproxy
|
||||
SECTION:=luci
|
||||
CATEGORY:=LuCI
|
||||
SUBMENU:=3. Applications
|
||||
TITLE:=LuCI support for koolproxy
|
||||
DEPENDS:=+openssl-util +ipset +dnsmasq-full +@BUSYBOX_CONFIG_DIFF +iptables-mod-nat-extra +wget
|
||||
MAINTAINER:=panda-mute <wxuzju@gmail.com>
|
||||
endef
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/luci-app-godproxy/conffiles
|
||||
/etc/config/koolproxy
|
||||
/usr/share/koolproxy/data/rules/
|
||||
endef
|
||||
|
||||
define Package/luci-app-godproxy/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci
|
||||
cp -pR ./luasrc/* $(1)/usr/lib/lua/luci
|
||||
$(INSTALL_DIR) $(1)/
|
||||
cp -pR ./root/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
|
||||
po2lmo ./po/zh-cn/koolproxy.po $(1)/usr/lib/lua/luci/i18n/koolproxy.zh-cn.lmo
|
||||
|
||||
ifeq ($(ARCH),aarch64)
|
||||
$(INSTALL_BIN) ./bin/aarch64 $(1)/usr/share/koolproxy/koolproxy
|
||||
|
||||
else ifeq ($(ARCH),arm)
|
||||
$(INSTALL_BIN) ./bin/arm $(1)/usr/share/koolproxy/koolproxy
|
||||
|
||||
else ifeq ($(ARCH),i386)
|
||||
$(INSTALL_BIN) ./bin/i386 $(1)/usr/share/koolproxy/koolproxy
|
||||
|
||||
else ifeq ($(ARCH),mips)
|
||||
$(INSTALL_BIN) ./bin/mips $(1)/usr/share/koolproxy/koolproxy
|
||||
|
||||
else ifeq ($(ARCH),mipsel)
|
||||
$(INSTALL_BIN) ./bin/mipsel $(1)/usr/share/koolproxy/koolproxy
|
||||
|
||||
else ($(ARCH),x86_64)
|
||||
$(INSTALL_BIN) ./bin/x86_64 $(1)/usr/share/koolproxy/koolproxy
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,luci-app-godproxy))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
## 更新:2021年11月5日:
|
||||
1、感谢 [Beginner-Go](https://github.com/Beginner-Go) 大佬提供最近几次修复。
|
||||
1、感谢 [Beginner-Go](https://github.com/Beginner-Go) 大佬提供最近几次修复.
|
||||
2、已经修复开启视频规则导致软件无法运行问题。主要原因是猴子大佬的规则内容清空了。直接在后台重新更新规则即可。
|
||||
|
||||
## 更新:2021年3月23日:
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -4,26 +4,15 @@ function index()
|
|||
if not nixio.fs.access("/etc/config/koolproxy") then
|
||||
return
|
||||
end
|
||||
|
||||
entry({"admin", "services", "koolproxy"}, alias("admin", "services", "koolproxy", "basic"),_("GodProxy 滤广告"), 1).dependent = true
|
||||
entry({"admin", "services", "koolproxy", "basic"}, cbi("koolproxy/basic"), _("基本设置"), 1).leaf = true
|
||||
entry({"admin", "services", "koolproxy", "control"}, cbi("koolproxy/control"), _("访问控制"), 2).leaf = true
|
||||
entry({"admin", "services", "koolproxy", "add_rule"}, cbi("koolproxy/add_rule"), _("规则订阅"), 3).leaf = true
|
||||
entry({"admin", "services", "koolproxy", "cert"}, cbi("koolproxy/cert"), _("证书管理"), 4).leaf = true
|
||||
entry({"admin", "services", "koolproxy", "white_list"}, cbi("koolproxy/white_list"), _("网站白名单设置"), 5).leaf = true
|
||||
entry({"admin", "services", "koolproxy", "black_list"}, cbi("koolproxy/black_list"), _("网站黑名单设置"), 6).leaf = true
|
||||
entry({"admin", "services", "koolproxy", "ip_white_list"}, cbi("koolproxy/ip_white_list"), _("IP白名单设置"), 7).leaf = true
|
||||
entry({"admin", "services", "koolproxy", "ip_black_list"}, cbi("koolproxy/ip_black_list"), _("IP黑名单设置"), 8).leaf = true
|
||||
entry({"admin", "services", "koolproxy", "custom_rule"}, cbi("koolproxy/custom_rule"), _("自定义规则"), 9).leaf = true
|
||||
entry({"admin", "services", "koolproxy", "update_log"}, cbi("koolproxy/update_log"), _("更新日志"), 10).leaf = true
|
||||
entry({"admin", "services", "koolproxy", "tips"}, cbi("koolproxy/tips"), _("帮助支持"), 11).leaf = true
|
||||
entry({"admin", "services", "koolproxy", "rss_rule"}, cbi("koolproxy/rss_rule"), nil).leaf = true
|
||||
entry({"admin", "services", "koolproxy", "status"}, call("act_status")).leaf = true
|
||||
|
||||
entry({"admin","services","koolproxy"},cbi("koolproxy/global"),_("KoolproxyR Plus+"),1).dependent=true
|
||||
entry({"admin","services","koolproxy","rss_rule"},cbi("koolproxy/rss_rule"), nil).leaf=true
|
||||
entry({"admin","services","koolproxy","status"},call("act_status")).leaf=true
|
||||
end
|
||||
|
||||
function act_status()
|
||||
local e = {}
|
||||
e.running = luci.sys.call("pidof koolproxy >/dev/null") == 0
|
||||
local e={}
|
||||
e.running=luci.sys.call("pidof koolproxy >/dev/null")==0
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
o = Map("koolproxy")
|
||||
|
||||
t = o:section(TypedSection,"rss_rule", translate("GodProxy 规则订阅"))
|
||||
t.description = translate("请确保订阅规则的兼容性")
|
||||
t.anonymous = true
|
||||
t.addremove = true
|
||||
t.sortable = true
|
||||
t.template = "cbi/tblsection"
|
||||
t.extedit = luci.dispatcher.build_url("admin/services/koolproxy/rss_rule/%s")
|
||||
|
||||
e = t:option(Flag, "load", translate("启用"))
|
||||
e.rmempty = false
|
||||
e.default = 0
|
||||
|
||||
e = t:option(DummyValue, "name", translate("规则名称"))
|
||||
function e.cfgvalue(...)
|
||||
return Value.cfgvalue(...) or translate("None")
|
||||
end
|
||||
|
||||
e = t:option(DummyValue,"url", translate("规则地址"))
|
||||
function e.cfgvalue(...)
|
||||
return Value.cfgvalue(...) or translate("None")
|
||||
end
|
||||
|
||||
t.create = function(...)
|
||||
local sid = TypedSection.create(...)
|
||||
if sid then
|
||||
luci.http.redirect(t.extedit % sid)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
e = t:option(DummyValue, "time", translate("更新时间"))
|
||||
|
||||
function Download()
|
||||
local t,e
|
||||
t = nixio.open("/tmp/upload/koolproxyca.tar.gz","r")
|
||||
luci.http.header('Content-Disposition','attachment; filename="koolproxyCA.tar.gz"')
|
||||
luci.http.prepare_content("application/octet-stream")
|
||||
while true do
|
||||
e = t:read(nixio.const.buffersize)
|
||||
if(not e)or(#e==0)then
|
||||
break
|
||||
else
|
||||
luci.http.write(e)
|
||||
end
|
||||
end
|
||||
t:close()
|
||||
luci.http.close()
|
||||
end
|
||||
|
||||
local t,e
|
||||
t = "/tmp/upload/"
|
||||
nixio.fs.mkdir(t)
|
||||
luci.http.setfilehandler(
|
||||
function(o,a,i)
|
||||
if not e then
|
||||
if not o then return end
|
||||
e = nixio.open(t..o.file,"w")
|
||||
if not e then
|
||||
return
|
||||
end
|
||||
end
|
||||
if a and e then
|
||||
e:write(a)
|
||||
end
|
||||
if i and e then
|
||||
e:close()
|
||||
e = nil
|
||||
luci.sys.call("/usr/share/koolproxy/camanagement restore 2>&1 >/dev/null")
|
||||
end
|
||||
end)
|
||||
|
||||
return o
|
|
@ -1,121 +0,0 @@
|
|||
-- Copyright 2018 Nick Peng (pymumu@gmail.com)
|
||||
|
||||
require ("nixio.fs")
|
||||
require ("luci.http")
|
||||
require ("luci.dispatcher")
|
||||
require ("nixio.fs")
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
local sys = require "luci.sys"
|
||||
local http = require "luci.http"
|
||||
|
||||
local o,t,e
|
||||
local v = luci.sys.exec("/usr/share/koolproxy/koolproxy -v")
|
||||
local a = luci.sys.exec("head -3 /usr/share/koolproxy/data/rules/koolproxy.txt | grep rules | awk -F' ' '{print $3,$4}'")
|
||||
local b = luci.sys.exec("head -4 /usr/share/koolproxy/data/rules/koolproxy.txt | grep video | awk -F' ' '{print $3,$4}'")
|
||||
local c = luci.sys.exec("head -3 /usr/share/koolproxy/data/rules/daily.txt | grep rules | awk -F' ' '{print $3,$4}'")
|
||||
local s = luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/easylistchina.txt | wc -l")
|
||||
local m = luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/mv.txt | wc -l")
|
||||
local u = luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/fanboy.txt | wc -l")
|
||||
local p = luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/yhosts.txt | wc -l")
|
||||
local h = luci.sys.exec("grep -v '^!' /usr/share/koolproxy/data/rules/user.txt | wc -l")
|
||||
local l = luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/koolproxy.txt | wc -l")
|
||||
local q = luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/daily.txt | wc -l")
|
||||
local f = luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/anti-ad.txt | wc -l")
|
||||
local i = luci.sys.exec("cat /usr/share/koolproxy/dnsmasq.adblock | wc -l")
|
||||
|
||||
o = Map("koolproxy")
|
||||
o.title = translate("GodProxy 滤广告")
|
||||
o.description = translate("GodProxy是基于KoolProxyR Plus重新整理的能识别adblock规则的免费开源软件,追求体验更快、更清洁的网络,屏蔽烦人的广告!")
|
||||
|
||||
o:section(SimpleSection).template = "koolproxy/koolproxy_status"
|
||||
|
||||
t = o:section(TypedSection, "global")
|
||||
t.anonymous = true
|
||||
|
||||
e = t:option(Flag, "enabled", translate("启用"))
|
||||
e.rmempty = false
|
||||
e.default = 0
|
||||
|
||||
e = t:option(Value, "startup_delay", translate("启动延迟"))
|
||||
e:value(0, translate("不启用"))
|
||||
for _, v in ipairs({5, 10, 15, 25, 40, 60}) do
|
||||
e:value(v, translate("%u 秒") %{v})
|
||||
end
|
||||
e.datatype = "uinteger"
|
||||
e.rmempty = false
|
||||
e.default = 0
|
||||
|
||||
e = t:option(ListValue, "koolproxy_mode", translate("过滤模式"))
|
||||
e.rmempty = false
|
||||
e:value(1, translate("全局模式"))
|
||||
e:value(2, translate("IPSET模式"))
|
||||
e:value(3, translate("视频模式"))
|
||||
e.default = 1
|
||||
|
||||
e = t:option(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:option(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("mv.txt", translate("乘风视频"))
|
||||
|
||||
e = t:option(ListValue, "koolproxy_port", translate("端口控制"))
|
||||
e.rmempty = false
|
||||
e:value(0, translate("关闭"))
|
||||
e:value(1, translate("开启"))
|
||||
e.default = 0
|
||||
|
||||
e = t:option(ListValue, "koolproxy_ipv6", translate("IPv6支持"))
|
||||
e.rmempty = false
|
||||
e:value(0, translate("关闭"))
|
||||
e:value(1, translate("开启"))
|
||||
e.default = 0
|
||||
|
||||
e = t:option(Value, "koolproxy_bp_port", translate("例外端口"))
|
||||
e.description = translate("单端口:80 多端口:80,443")
|
||||
e.rmempty = false
|
||||
e:depends("koolproxy_port", "1")
|
||||
|
||||
e = t:option(Flag, "koolproxy_host", translate("开启Adblock Plus Hosts"))
|
||||
e:depends("koolproxy_mode","2")
|
||||
e.default = 0
|
||||
|
||||
e = t:option(ListValue, "koolproxy_acl_default", translate("默认访问控制"))
|
||||
e.description = translate("访问控制设置中其他主机的默认规则")
|
||||
e.rmempty = false
|
||||
e:value(0, translate("不过滤"))
|
||||
e:value(1, translate("过滤HTTP协议"))
|
||||
e:value(2, translate("过滤HTTP(S)协议"))
|
||||
e:value(3, translate("全部过滤"))
|
||||
e.default = 1
|
||||
|
||||
e = t:option(ListValue, "time_update", translate("定时更新"))
|
||||
e.description = translate("定时更新规则。请把时间修改掉,默认时间使用人数多会更新失败")
|
||||
e.rmempty = false
|
||||
for t = 0,23 do
|
||||
e:value(t,translate("每天"..t.."点"))
|
||||
end
|
||||
e:value(nil, translate("关闭"))
|
||||
e.default = nil
|
||||
|
||||
e = t:option(Button, "restart", translate("规则状态"))
|
||||
e.inputtitle = translate("更新规则")
|
||||
e.inputstyle = "reload"
|
||||
e.write = function()
|
||||
luci.sys.call("/usr/share/koolproxy/kpupdate 2>&1 >/dev/null")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin","services","koolproxy"))
|
||||
end
|
||||
e.description = translate(string.format("<font color=\"red\"><strong>更新订阅规则与Adblock Plus Hosts</strong></font><br /><font color=\"green\">ABP规则: %s条<br />Fanboy规则: %s条<br />Yhosts规则: %s条<br />Anti-AD规则: %s条<br />静态规则: %s条<br />视频规则: %s<br />乘风视频: %s条<br />每日规则: %s条<br />自定义规则: %s条<br />Host: %s条</font><br />", s, u, p, f, l, b, m, q, h, i))
|
||||
|
||||
return o
|
|
@ -1,32 +0,0 @@
|
|||
o = Map("koolproxy")
|
||||
|
||||
t = o:section(TypedSection, "global")
|
||||
t.anonymous = true
|
||||
|
||||
e = t:option(TextValue, "adblock_domain")
|
||||
e.description = translate("加入的网址将走广告过滤端口。只针对黑名单模式。只能输入WEB地址,如:google.com,每个地址一行。")
|
||||
e.rmempty = false
|
||||
e.rows = 28
|
||||
e.wrap = "off"
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
local i = "/etc/adblocklist/adblock"
|
||||
|
||||
function e.cfgvalue()
|
||||
return fs.readfile(i) or ""
|
||||
end
|
||||
|
||||
function e.write(self, section, value)
|
||||
if value then
|
||||
value = value:gsub("\r\n", "\n")
|
||||
else
|
||||
value = ""
|
||||
end
|
||||
fs.writefile("/tmp/adblock", value)
|
||||
if (luci.sys.call("cmp -s /tmp/adblock /etc/adblocklist/adblock") == 1) then
|
||||
fs.writefile(i, value)
|
||||
end
|
||||
fs.remove("/tmp/adblock")
|
||||
end
|
||||
|
||||
return o
|
|
@ -1,31 +0,0 @@
|
|||
o = Map("koolproxy")
|
||||
|
||||
t = o:section(TypedSection, "global")
|
||||
t.title = translate("证书恢复")
|
||||
t.description = translate("上传恢复已备份的证书,文件名必须为koolproxyCA.tar.gz")
|
||||
t.anonymous = true
|
||||
|
||||
e = t:option(DummyValue,"c1status")
|
||||
e = t:option(FileUpload,"")
|
||||
e.template = "koolproxy/caupload"
|
||||
|
||||
t = o:section(TypedSection, "global")
|
||||
t.title = translate("证书备份")
|
||||
t.description = translate("下载备份的证书")
|
||||
t.anonymous = true
|
||||
|
||||
e = t:option(DummyValue,"",nil)
|
||||
e.template = "koolproxy/cadvalue"
|
||||
if nixio.fs.access("/usr/share/koolproxy/data/certs/ca.crt") then
|
||||
e = t:option(DummyValue,"c2status")
|
||||
e = t:option(Button,"certificate")
|
||||
e.inputtitle = translate("下载证书备份")
|
||||
e.inputstyle = "reload"
|
||||
e.write=function()
|
||||
luci.sys.call("/usr/share/koolproxy/camanagement backup 2>&1 >/dev/null")
|
||||
Download()
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin","services","koolproxy"))
|
||||
end
|
||||
end
|
||||
|
||||
return o
|
|
@ -1,33 +0,0 @@
|
|||
o = Map("koolproxy")
|
||||
|
||||
t = o:section(TypedSection, "acl_rule", translate("GodProxy 访问控制"))
|
||||
t.anonymous = true
|
||||
|
||||
t.description = translate("访问控制列表是用于指定特殊IP过滤模式的工具,如为已安装证书的客户端开启https广告过滤等,MAC或者IP必须填写其中一项。")
|
||||
t.template = "cbi/tblsection"
|
||||
t.sortable = true
|
||||
t.addremove = true
|
||||
|
||||
e = t:option(Value, "remarks", translate("客户端备注"))
|
||||
e.rmempty = true
|
||||
e.width = "30%"
|
||||
|
||||
e = t:option(Value, "ipaddr", translate("内部IP地址"))
|
||||
e.width = "20%"
|
||||
e.datatype = "ip4addr"
|
||||
luci.ip.neighbors({family = 4}, function(neighbor)
|
||||
if neighbor.reachable then
|
||||
e:value(neighbor.dest:string(), "%s (%s)" %{neighbor.dest:string(), neighbor.mac})
|
||||
end
|
||||
end)
|
||||
|
||||
e = t:option(ListValue, "proxy_mode", translate("访问控制"))
|
||||
e.rmempty = false
|
||||
e.width = "20%"
|
||||
e:value(0,translate("不过滤"))
|
||||
e:value(1,translate("过滤 HTTP"))
|
||||
e:value(2,translate("过滤HTTP + HTTPS"))
|
||||
e:value(3,translate("过滤全端口"))
|
||||
e.default = 1
|
||||
|
||||
return o
|
|
@ -1,32 +0,0 @@
|
|||
o = Map("koolproxy")
|
||||
|
||||
t = o:section(TypedSection, "global")
|
||||
t.anonymous = true
|
||||
|
||||
e = t:option(TextValue, "user_rule")
|
||||
e.description = translate("输入你的自定义规则,每条规则一行。")
|
||||
e.rmempty = false
|
||||
e.rows = 28
|
||||
e.wrap = "off"
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
local i = "/usr/share/koolproxy/data/user.txt"
|
||||
|
||||
function e.cfgvalue()
|
||||
return fs.readfile(i) or ""
|
||||
end
|
||||
|
||||
function e.write(self, section, value)
|
||||
if value then
|
||||
value = value:gsub("\r\n", "\n")
|
||||
else
|
||||
value = ""
|
||||
end
|
||||
fs.writefile("/tmp/user.txt", value)
|
||||
if (luci.sys.call("cmp -s /tmp/user.txt /usr/share/koolproxy/data/user.txt") == 1) then
|
||||
fs.writefile(i, value)
|
||||
end
|
||||
fs.remove("/tmp/user.txt")
|
||||
end
|
||||
|
||||
return o
|
|
@ -0,0 +1,396 @@
|
|||
-- Copyright 2018 Nick Peng (pymumu@gmail.com)
|
||||
|
||||
require ("nixio.fs")
|
||||
require ("luci.http")
|
||||
require ("luci.dispatcher")
|
||||
require ("nixio.fs")
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
local sys = require "luci.sys"
|
||||
local http = require "luci.http"
|
||||
|
||||
local o,t,e
|
||||
local v=luci.sys.exec("/usr/share/koolproxy/koolproxy -v")
|
||||
local a=luci.sys.exec("head -3 /usr/share/koolproxy/data/rules/koolproxy.txt | grep rules | awk -F' ' '{print $3,$4}'")
|
||||
local b=luci.sys.exec("head -4 /usr/share/koolproxy/data/rules/koolproxy.txt | grep video | awk -F' ' '{print $3,$4}'")
|
||||
local c=luci.sys.exec("head -3 /usr/share/koolproxy/data/rules/daily.txt | grep rules | awk -F' ' '{print $3,$4}'")
|
||||
local s=luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/easylistchina.txt | wc -l")
|
||||
local m=luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/mv.txt | wc -l")
|
||||
local u=luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/fanboy.txt | wc -l")
|
||||
local p=luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/yhosts.txt | wc -l")
|
||||
local h=luci.sys.exec("grep -v '^!' /usr/share/koolproxy/data/rules/user.txt | wc -l")
|
||||
local l=luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/koolproxy.txt | wc -l")
|
||||
local q=luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/daily.txt | wc -l")
|
||||
local f=luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/anti-ad.txt | wc -l")
|
||||
local i=luci.sys.exec("cat /usr/share/koolproxy/dnsmasq.adblock | wc -l")
|
||||
|
||||
o = Map("koolproxy", translate("GodProxy 滤广告 "), translate("GodProxy是基于KoolProxyR Plus重新整理的能识别adblock规则的免费开源软件,追求体验更快、更清洁的网络,屏蔽烦人的广告!"))
|
||||
o:section(SimpleSection).template = "koolproxy/koolproxy_status"
|
||||
|
||||
t = o:section(TypedSection, "global")
|
||||
t.anonymous = true
|
||||
|
||||
t:tab("base",translate("Basic Settings"))
|
||||
|
||||
e = t:taboption("base", Flag, "enabled", translate("Enable"))
|
||||
e.default = 0
|
||||
e.rmempty = false
|
||||
|
||||
e = t:taboption("base", Value, "startup_delay", translate("启动延迟"))
|
||||
e:value(0, translate("不启用"))
|
||||
for _, v in ipairs({5, 10, 15, 25, 40, 60}) do
|
||||
e:value(v, translate("%u 秒") %{v})
|
||||
end
|
||||
e.datatype = "uinteger"
|
||||
e.default = 0
|
||||
e.rmempty = false
|
||||
|
||||
e = t:taboption("base", ListValue, "koolproxy_mode", translate("Filter Mode"))
|
||||
e.default = 1
|
||||
e.rmempty = false
|
||||
e:value(1, translate("全局模式"))
|
||||
e:value(2, translate("IPSET模式"))
|
||||
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("mv.txt", translate("乘风视频"))
|
||||
|
||||
e = t:taboption("base", ListValue, "koolproxy_port", translate("端口控制"))
|
||||
e.default = 0
|
||||
e.rmempty = false
|
||||
e:value(0, translate("关闭"))
|
||||
e:value(1, translate("开启"))
|
||||
|
||||
e = t:taboption("base", ListValue, "koolproxy_ipv6", translate("IPv6支持"))
|
||||
e.default = 0
|
||||
e.rmempty = false
|
||||
e:value(0, translate("关闭"))
|
||||
e:value(1, translate("开启"))
|
||||
|
||||
e = t:taboption("base", Value, "koolproxy_bp_port", translate("例外端口"))
|
||||
e:depends("koolproxy_port", "1")
|
||||
e.rmempty = false
|
||||
e.description = translate(string.format("<font color=\"red\"><strong>单端口:80 多端口:80,443</strong></font>"))
|
||||
|
||||
e=t:taboption("base",Flag,"koolproxy_host",translate("开启Adblock Plus Hosts"))
|
||||
e.default=0
|
||||
e:depends("koolproxy_mode","2")
|
||||
|
||||
|
||||
e = t:taboption("base", ListValue, "koolproxy_acl_default", translate("默认访问控制"))
|
||||
e.default = 1
|
||||
e.rmempty = false
|
||||
e:value(0, translate("不过滤"))
|
||||
e:value(1, translate("过滤HTTP协议"))
|
||||
e:value(2, translate("过滤HTTP(S)协议"))
|
||||
e:value(3, translate("全部过滤"))
|
||||
e.description = translate(string.format("<font color=\"blue\"><strong>访问控制设置中其他主机的默认规则</strong></font>"))
|
||||
|
||||
e = t:taboption("base", ListValue, "time_update", translate("定时更新"))
|
||||
|
||||
for t = 0,23 do
|
||||
|
||||
e:value(t,translate("每天"..t.."点"))
|
||||
end
|
||||
e:value(nil, translate("关闭"))
|
||||
e.default = nil
|
||||
e.rmempty = false
|
||||
e.description = translate(string.format("<font color=\"red\"><strong>定时更新规则。请把时间修改掉,默认时间使用人数多会更新失败</strong></font>"))
|
||||
|
||||
e = t:taboption("base", Button, "restart", translate("规则状态"))
|
||||
e.inputtitle = translate("更新规则")
|
||||
e.inputstyle = "reload"
|
||||
e.write = function()
|
||||
luci.sys.call("/usr/share/koolproxy/kpupdate 2>&1 >/dev/null")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin","services","koolproxy"))
|
||||
end
|
||||
e.description = translate(string.format("<font color=\"red\"><strong>更新订阅规则与Adblock Plus Hosts</strong></font><br /><font color=\"green\">ABP规则: %s条<br />Fanboy规则: %s条<br />Yhosts规则: %s条<br />Anti-AD规则: %s条<br />静态规则: %s条<br />视频规则: %s<br />乘风视频: %s条<br />每日规则: %s条<br />自定义规则: %s条<br />Host: %s条</font><br />", s, u, p, f, l, b, m, q, h, i))
|
||||
t:tab("cert",translate("Certificate Management"))
|
||||
|
||||
e=t:taboption("cert",DummyValue,"c1status",translate("<div align=\"left\"><strong>证书恢复</strong></div>"))
|
||||
e=t:taboption("cert",FileUpload,"")
|
||||
e.template="koolproxy/caupload"
|
||||
e=t:taboption("cert",DummyValue,"",nil)
|
||||
e.template="koolproxy/cadvalue"
|
||||
if nixio.fs.access("/usr/share/koolproxy/data/certs/ca.crt")then
|
||||
e=t:taboption("cert",DummyValue,"c2status",translate("<div align=\"left\"><strong>证书备份</strong></div>"))
|
||||
e=t:taboption("cert",Button,"certificate")
|
||||
e.inputtitle=translate("Backup Download")
|
||||
e.inputstyle="reload"
|
||||
e.write=function()
|
||||
luci.sys.call("/usr/share/koolproxy/camanagement backup 2>&1 >/dev/null")
|
||||
Download()
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin","services","koolproxy"))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
t:tab("white_weblist",translate("网站白名单设置"))
|
||||
|
||||
local i = "/etc/adblocklist/adbypass"
|
||||
e = t:taboption("white_weblist", TextValue, "adbypass_domain")
|
||||
e.description = translate("这些已经加入的网站将不会使用过滤器。请输入网站的域名,每行只能输入一个网站域名。例如google.com。")
|
||||
e.rows = 28
|
||||
e.wrap = "off"
|
||||
e.rmempty = false
|
||||
|
||||
function e.cfgvalue()
|
||||
return fs.readfile(i) or ""
|
||||
end
|
||||
|
||||
function e.write(self, section, value)
|
||||
if value then
|
||||
value = value:gsub("\r\n", "\n")
|
||||
else
|
||||
value = ""
|
||||
end
|
||||
fs.writefile("/tmp/adbypass", value)
|
||||
if (luci.sys.call("cmp -s /tmp/adbypass /etc/adblocklist/adbypass") == 1) then
|
||||
fs.writefile(i, value)
|
||||
end
|
||||
fs.remove("/tmp/adbypass")
|
||||
end
|
||||
|
||||
t:tab("weblist",translate("Set Backlist Of Websites"))
|
||||
|
||||
local i = "/etc/adblocklist/adblock"
|
||||
e = t:taboption("weblist", TextValue, "adblock_domain")
|
||||
e.description = translate("加入的网址将走广告过滤端口。只针对黑名单模式。只能输入WEB地址,如:google.com,每个地址一行。")
|
||||
e.rows = 28
|
||||
e.wrap = "off"
|
||||
e.rmempty = false
|
||||
|
||||
function e.cfgvalue()
|
||||
return fs.readfile(i) or ""
|
||||
end
|
||||
|
||||
function e.write(self, section, value)
|
||||
if value then
|
||||
value = value:gsub("\r\n", "\n")
|
||||
else
|
||||
value = ""
|
||||
end
|
||||
fs.writefile("/tmp/adblock", value)
|
||||
if (luci.sys.call("cmp -s /tmp/adblock /etc/adblocklist/adblock") == 1) then
|
||||
fs.writefile(i, value)
|
||||
end
|
||||
fs.remove("/tmp/adblock")
|
||||
end
|
||||
|
||||
t:tab("white_iplist",translate("IP白名单设置"))
|
||||
|
||||
local i = "/etc/adblocklist/adbypassip"
|
||||
e = t:taboption("white_iplist", TextValue, "adbypass_ip")
|
||||
e.description = translate("这些已加入的ip地址将使用代理,但只有GFW型号。请输入ip地址或ip地址段,每行只能输入一个ip地址。例如,112.123.134.145 / 24或112.123.134.145。")
|
||||
e.rows = 28
|
||||
e.wrap = "off"
|
||||
e.rmempty = false
|
||||
|
||||
function e.cfgvalue()
|
||||
return fs.readfile(i) or ""
|
||||
end
|
||||
|
||||
function e.write(self, section, value)
|
||||
if value then
|
||||
value = value:gsub("\r\n", "\n")
|
||||
else
|
||||
value = ""
|
||||
end
|
||||
fs.writefile("/tmp/adbypassip", value)
|
||||
if (luci.sys.call("cmp -s /tmp/adbypassip /etc/adblocklist/adbypassip") == 1) then
|
||||
fs.writefile(i, value)
|
||||
end
|
||||
fs.remove("/tmp/adbypassip")
|
||||
end
|
||||
|
||||
t:tab("iplist",translate("IP黑名单设置"))
|
||||
|
||||
local i = "/etc/adblocklist/adblockip"
|
||||
e = t:taboption("iplist", TextValue, "adblock_ip")
|
||||
e.description = translate("这些已经加入的ip地址不会使用过滤器.请输入ip地址或ip地址段,每行只能输入一个ip地址。例如,112.123.134.145 / 24或112.123.134.145。")
|
||||
e.rows = 28
|
||||
e.wrap = "off"
|
||||
e.rmempty = false
|
||||
|
||||
function e.cfgvalue()
|
||||
return fs.readfile(i) or ""
|
||||
end
|
||||
|
||||
function e.write(self, section, value)
|
||||
if value then
|
||||
value = value:gsub("\r\n", "\n")
|
||||
else
|
||||
value = ""
|
||||
end
|
||||
fs.writefile("/tmp/adblockip", value)
|
||||
if (luci.sys.call("cmp -s /tmp/adblockip /etc/adblocklist/adblockip") == 1) then
|
||||
fs.writefile(i, value)
|
||||
end
|
||||
fs.remove("/tmp/adblockip")
|
||||
end
|
||||
|
||||
t:tab("customlist", translate("Set Backlist Of custom"))
|
||||
|
||||
local i = "/usr/share/koolproxy/data/user.txt"
|
||||
e = t:taboption("customlist", TextValue, "user_rule")
|
||||
e.description = translate("Enter your custom rules, each row.")
|
||||
e.rows = 28
|
||||
e.wrap = "off"
|
||||
e.rmempty = false
|
||||
|
||||
function e.cfgvalue()
|
||||
return fs.readfile(i) or ""
|
||||
end
|
||||
|
||||
function e.write(self, section, value)
|
||||
if value then
|
||||
value = value:gsub("\r\n", "\n")
|
||||
else
|
||||
value = ""
|
||||
end
|
||||
fs.writefile("/tmp/user.txt", value)
|
||||
if (luci.sys.call("cmp -s /tmp/user.txt /usr/share/koolproxy/data/user.txt") == 1) then
|
||||
fs.writefile(i, value)
|
||||
end
|
||||
fs.remove("/tmp/user.txt")
|
||||
end
|
||||
|
||||
t:tab("logs",translate("View the logs"))
|
||||
|
||||
local i = "/var/log/koolproxy.log"
|
||||
e = t:taboption("logs", TextValue, "kpupdate_log")
|
||||
e.description = translate("Koolproxy Logs")
|
||||
e.rows = 28
|
||||
e.wrap = "off"
|
||||
e.rmempty = false
|
||||
|
||||
function e.cfgvalue()
|
||||
return fs.readfile(i) or ""
|
||||
end
|
||||
|
||||
function e.write(self, section, value)
|
||||
end
|
||||
|
||||
t=o:section(TypedSection,"acl_rule",translate("GodProxy 访问控制"),
|
||||
translate("ACLs is a tools which used to designate specific IP filter mode,The MAC addresses added to the list will be filtered using https"))
|
||||
t.template="cbi/tblsection"
|
||||
t.sortable=true
|
||||
t.anonymous=true
|
||||
t.addremove=true
|
||||
e=t:option(Value,"remarks",translate("Client Remarks"))
|
||||
e.width="30%"
|
||||
e.rmempty=true
|
||||
e=t:option(Value,"ipaddr",translate("IP Address"))
|
||||
e.width="20%"
|
||||
e.datatype="ip4addr"
|
||||
luci.ip.neighbors({family = 4}, function(neighbor)
|
||||
if neighbor.reachable then
|
||||
e:value(neighbor.dest:string(), "%s (%s)" %{neighbor.dest:string(), neighbor.mac})
|
||||
end
|
||||
end)
|
||||
e=t:option(Value,"mac",translate("MAC Address"))
|
||||
e.width="20%"
|
||||
e.rmempty=true
|
||||
e.datatype="macaddr"
|
||||
luci.ip.neighbors({family = 4}, function(neighbor)
|
||||
if neighbor.reachable then
|
||||
e:value(neighbor.mac, "%s (%s)" %{neighbor.mac, neighbor.dest:string()})
|
||||
end
|
||||
end)
|
||||
e=t:option(ListValue,"proxy_mode",translate("访问控制"))
|
||||
e.width="20%"
|
||||
e.default=1
|
||||
e.rmempty=false
|
||||
e:value(0,translate("不过滤"))
|
||||
e:value(1,translate("过滤 HTTP"))
|
||||
e:value(2,translate("过滤HTTP + HTTPS"))
|
||||
e:value(3,translate("过滤全端口"))
|
||||
|
||||
t=o:section(TypedSection,"rss_rule",translate("GodProxy 规则订阅"), translate("请确保订阅规则的兼容性"))
|
||||
t.anonymous=true
|
||||
t.addremove=true
|
||||
t.sortable=true
|
||||
t.template="cbi/tblsection"
|
||||
t.extedit=luci.dispatcher.build_url("admin/services/koolproxy/rss_rule/%s")
|
||||
|
||||
t.create=function(...)
|
||||
local sid=TypedSection.create(...)
|
||||
if sid then
|
||||
luci.http.redirect(t.extedit % sid)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
e=t:option(Flag,"load",translate("启用"))
|
||||
e.default=0
|
||||
e.rmempty=false
|
||||
|
||||
e=t:option(DummyValue,"name",translate("规则名称"))
|
||||
function e.cfgvalue(...)
|
||||
return Value.cfgvalue(...) or translate("None")
|
||||
end
|
||||
|
||||
e=t:option(DummyValue,"url",translate("规则地址"))
|
||||
function e.cfgvalue(...)
|
||||
return Value.cfgvalue(...) or translate("None")
|
||||
end
|
||||
|
||||
e=t:option(DummyValue,"time",translate("更新时间"))
|
||||
|
||||
function Download()
|
||||
local t,e
|
||||
t=nixio.open("/tmp/upload/koolproxyca.tar.gz","r")
|
||||
luci.http.header('Content-Disposition','attachment; filename="koolproxyCA.tar.gz"')
|
||||
luci.http.prepare_content("application/octet-stream")
|
||||
while true do
|
||||
e=t:read(nixio.const.buffersize)
|
||||
if(not e)or(#e==0)then
|
||||
break
|
||||
else
|
||||
luci.http.write(e)
|
||||
end
|
||||
end
|
||||
t:close()
|
||||
luci.http.close()
|
||||
end
|
||||
local t,e
|
||||
t="/tmp/upload/"
|
||||
nixio.fs.mkdir(t)
|
||||
luci.http.setfilehandler(
|
||||
function(o,a,i)
|
||||
if not e then
|
||||
if not o then return end
|
||||
e=nixio.open(t..o.file,"w")
|
||||
if not e then
|
||||
return
|
||||
end
|
||||
end
|
||||
if a and e then
|
||||
e:write(a)
|
||||
end
|
||||
if i and e then
|
||||
e:close()
|
||||
e=nil
|
||||
luci.sys.call("/usr/share/koolproxy/camanagement restore 2>&1 >/dev/null")
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
t=o:section(TypedSection,"usetips",translate("GodProxy 帮助支持"))
|
||||
t.anonymous = true
|
||||
t:append(Template("koolproxy/feedback"))
|
||||
return o
|
|
@ -1,32 +0,0 @@
|
|||
o = Map("koolproxy")
|
||||
|
||||
t = o:section(TypedSection, "global")
|
||||
t.anonymous = true
|
||||
|
||||
e = t:option(TextValue, "adblock_ip")
|
||||
e.description = translate("这些已经加入的ip地址不会使用过滤器.请输入ip地址或ip地址段,每行只能输入一个ip地址。例如,112.123.134.145 / 24或112.123.134.145。")
|
||||
e.rows = 28
|
||||
e.wrap = "off"
|
||||
e.rmempty = false
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
local i = "/etc/adblocklist/adblockip"
|
||||
|
||||
function e.cfgvalue()
|
||||
return fs.readfile(i) or ""
|
||||
end
|
||||
|
||||
function e.write(self, section, value)
|
||||
if value then
|
||||
value = value:gsub("\r\n", "\n")
|
||||
else
|
||||
value = ""
|
||||
end
|
||||
fs.writefile("/tmp/adblockip", value)
|
||||
if (luci.sys.call("cmp -s /tmp/adblockip /etc/adblocklist/adblockip") == 1) then
|
||||
fs.writefile(i, value)
|
||||
end
|
||||
fs.remove("/tmp/adblockip")
|
||||
end
|
||||
|
||||
return o
|
|
@ -1,32 +0,0 @@
|
|||
o = Map("koolproxy")
|
||||
|
||||
t = o:section(TypedSection, "global")
|
||||
t.anonymous = true
|
||||
|
||||
e = t:option(TextValue, "adbypass_ip")
|
||||
e.description = translate("这些已加入的ip地址将使用代理,但只有GFW型号。请输入ip地址或ip地址段,每行只能输入一个ip地址。例如,112.123.134.145 / 24或112.123.134.145。")
|
||||
e.rows = 28
|
||||
e.wrap = "off"
|
||||
e.rmempty = false
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
local i = "/etc/adblocklist/adbypassip"
|
||||
|
||||
function e.cfgvalue()
|
||||
return fs.readfile(i) or ""
|
||||
end
|
||||
|
||||
function e.write(self, section, value)
|
||||
if value then
|
||||
value = value:gsub("\r\n", "\n")
|
||||
else
|
||||
value = ""
|
||||
end
|
||||
fs.writefile("/tmp/adbypassip", value)
|
||||
if (luci.sys.call("cmp -s /tmp/adbypassip /etc/adblocklist/adbypassip") == 1) then
|
||||
fs.writefile(i, value)
|
||||
end
|
||||
fs.remove("/tmp/adbypassip")
|
||||
end
|
||||
|
||||
return o
|
|
@ -2,8 +2,7 @@ local m, s, o
|
|||
local koolproxy = "koolproxy"
|
||||
local sid = arg[1]
|
||||
|
||||
m = Map(koolproxy)
|
||||
m.title = translate("GodProxy滤广告 - 编辑规则")
|
||||
m = Map(koolproxy, "%s - %s" %{translate("GodProxy滤广告"), translate("编辑规则")})
|
||||
m.redirect = luci.dispatcher.build_url("admin/services/koolproxy")
|
||||
|
||||
if not arg[1] or m.uci:get(koolproxy, sid) ~= "rss_rule" then
|
||||
|
@ -16,15 +15,15 @@ s = m:section(NamedSection, sid, "rss_rule")
|
|||
s.anonymous = true
|
||||
s.addremove = true
|
||||
|
||||
o = s:option(Flag, "load", translate("启用"))
|
||||
o.rmempty = false
|
||||
o.default = 0
|
||||
o=s:option(Flag,"load",translate("启用"))
|
||||
o.default=0
|
||||
o.rmempty=false
|
||||
|
||||
o = s:option(Value, "name", translate("规则描述"))
|
||||
o.rmempty = true
|
||||
o=s:option(Value,"name",translate("规则描述"))
|
||||
o.rmempty=true
|
||||
|
||||
o = s:option(Value, "url", translate("规则地址"))
|
||||
o.rmempty = false
|
||||
o=s:option(Value,"url",translate("规则地址"))
|
||||
o.rmempty=false
|
||||
o.placeholder="[https|http|ftp]://[Hostname]/[File]"
|
||||
function o.validate(self, value)
|
||||
if not value then
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
o = Map("koolproxy")
|
||||
|
||||
t = o:section(TypedSection, "usetips")
|
||||
t.title = translate("GodProxy 帮助支持")
|
||||
t.anonymous = true
|
||||
t:append(Template("koolproxy/tips"))
|
||||
|
||||
return o
|
|
@ -1,22 +0,0 @@
|
|||
o = Map("koolproxy")
|
||||
|
||||
t = o:section(TypedSection, "global")
|
||||
t.anonymous = true
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
local i = "/var/log/koolproxy.log"
|
||||
|
||||
e = t:option(TextValue, "kpupdate_log")
|
||||
e.description = translate("查看最近的更新日志")
|
||||
e.rmempty = false
|
||||
e.rows = 28
|
||||
e.wrap = "off"
|
||||
|
||||
function e.cfgvalue()
|
||||
return fs.readfile(i) or ""
|
||||
end
|
||||
|
||||
function e.write(self, section, value)
|
||||
end
|
||||
|
||||
return o
|
|
@ -1,32 +0,0 @@
|
|||
o = Map("koolproxy")
|
||||
|
||||
t = o:section(TypedSection, "global")
|
||||
t.anonymous = true
|
||||
|
||||
e = t:option(TextValue, "adbypass_domain")
|
||||
e.description = translate("这些已经加入的网站将不会使用过滤器。请输入网站的域名,每行只能输入一个网站域名。例如google.com。")
|
||||
e.rmempty = false
|
||||
e.rows = 28
|
||||
e.wrap = "off"
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
local i = "/etc/adblocklist/adbypass"
|
||||
|
||||
function e.cfgvalue()
|
||||
return fs.readfile(i) or ""
|
||||
end
|
||||
|
||||
function e.write(self, section, value)
|
||||
if value then
|
||||
value = value:gsub("\r\n", "\n")
|
||||
else
|
||||
value = ""
|
||||
end
|
||||
fs.writefile("/tmp/adbypass", value)
|
||||
if (luci.sys.call("cmp -s /tmp/adbypass /etc/adblocklist/adbypass") == 1) then
|
||||
fs.writefile(i, value)
|
||||
end
|
||||
fs.remove("/tmp/adbypass")
|
||||
end
|
||||
|
||||
return o
|
|
@ -1,5 +1,5 @@
|
|||
<%+cbi/valueheader%>
|
||||
<label class="cbi-value" style="display:inline-block; width: 400px" for="ulfile"></label><br />
|
||||
<label class="cbi-value" style="display:inline-block; width: 400px" for="ulfile"><font color="red"><%:Upload backup file,The file name must be koolproxyCA.tar.gz%></font></label><br />
|
||||
<input class="cbi-input-file" style="width: 400px" type="file" id="ulfile" name="ulfile" />
|
||||
<input type="submit" class="cbi-button cbi-input-apply" name="upload" value="<%:上传恢复证书%>" />
|
||||
<input type="submit" class="cbi-button cbi-input-apply" name="upload" value="<%:Upload Restore%>" />
|
||||
<%+cbi/valuefooter%>
|
||||
|
|
|
@ -4,9 +4,9 @@ XHR.poll(3, '<%=url([[admin]], [[services]], [[koolproxy]], [[status]])%>', null
|
|||
var tb = document.getElementById('koolproxy_status');
|
||||
if (data && tb) {
|
||||
if (data.running) {
|
||||
tb.innerHTML = '<em><b><font color=green><%:GodProxy 滤广告%> <%:运行中%></font></b></em>';
|
||||
tb.innerHTML = '<em><b><font color=green><%:KoolproxyR Plus+%> <%:RUNNING%></font></b></em>';
|
||||
} else {
|
||||
tb.innerHTML = '<em><b><font color=red><%:GodProxy 滤广告%> <%:未运行%></font></b></em>';
|
||||
tb.innerHTML = '<em><b><font color=red><%:KoolproxyR Plus+%> <%:NOT RUNNING%></font></b></em>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,6 @@ XHR.poll(3, '<%=url([[admin]], [[services]], [[koolproxy]], [[status]])%>', null
|
|||
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
||||
<fieldset class="cbi-section">
|
||||
<p id="koolproxy_status">
|
||||
<em><%:收集数据...%></em>
|
||||
<em><%:Collecting data...%></em>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
msgid "RUNNING"
|
||||
msgstr "运行中"
|
||||
|
||||
msgid "NOT RUNNING"
|
||||
msgstr "未运行"
|
||||
|
||||
msgid "Filter Mode"
|
||||
msgstr "过滤模式"
|
||||
|
||||
msgid "Collecting data..."
|
||||
msgstr "收集数据..."
|
||||
|
||||
msgid "Basic Settings"
|
||||
msgstr "基础设置"
|
||||
|
||||
msgid "View the logs"
|
||||
msgstr "更新日志"
|
||||
|
||||
msgid "Certificate Management"
|
||||
msgstr "证书管理"
|
||||
|
||||
msgid "Set Backlist Of custom"
|
||||
msgstr "自定义规则"
|
||||
|
||||
msgid "IP Address"
|
||||
msgstr "内部IP地址"
|
||||
|
||||
msgid "Client Remarks"
|
||||
msgstr "客户端备注"
|
||||
|
||||
msgid "Upload Restore"
|
||||
msgstr "上传恢复证书"
|
||||
|
||||
msgid "Backup Download"
|
||||
msgstr "下载证书备份"
|
||||
|
||||
msgid "Set Backlist Of Websites"
|
||||
msgstr "网站黑名单设置"
|
||||
|
||||
msgid "KoolproxyR Plus+"
|
||||
msgstr "GodProxy 滤广告"
|
||||
|
||||
msgid "Koolproxy Logs"
|
||||
msgstr "查看最近的更新日志"
|
||||
|
||||
msgid "Enter your custom rules, each row."
|
||||
msgstr "输入你的自定义规则,每条规则一行。"
|
||||
|
||||
msgid "Upload backup file,The file name must be koolproxyCA.tar.gz"
|
||||
msgstr "上传恢复已备份的证书,文件名必须为koolproxyCA.tar.gz"
|
||||
|
||||
msgid "ACLs is a tools which used to designate specific IP filter mode,The MAC addresses added to the list will be filtered using https"
|
||||
msgstr "访问控制列表是用于指定特殊IP过滤模式的工具,如为已安装证书的客户端开启https广告过滤等,MAC或者IP必须填写其中一项。"
|
|
@ -0,0 +1 @@
|
|||
zh-cn
|
|
@ -1,11 +1,13 @@
|
|||
local jd = 'jd-dailybonus'
|
||||
local uci = luci.model.uci.cursor()
|
||||
local sys = require 'luci.sys'
|
||||
|
||||
m = Map(jd)
|
||||
m = Map('jd-dailybonus')
|
||||
m.title = translate('京东签到服务')
|
||||
m.description = translate('<a href=\"https://github.com/jerrykuku/luci-app-jd-dailybonus\" target=\"_blank\"> GitHub 项目地址 </a>')
|
||||
|
||||
-- [[ 基本设置 ]]--
|
||||
|
||||
s = m:section(TypedSection, 'global', translate('基本设置'))
|
||||
s = m:section(TypedSection, 'global')
|
||||
s.anonymous = true
|
||||
|
||||
o = s:option(DynamicList, "Cookies", translate("账号 Cookie 列表"))
|
||||
|
@ -34,6 +36,7 @@ o.datatype = integer
|
|||
o.description = translate('接口超时退出,单位毫秒 用于可能发生的网络不稳定, 0则关闭.')
|
||||
|
||||
-- server chan
|
||||
|
||||
o = s:option(ListValue, 'serverurl', translate('Server酱的推送接口地址'))
|
||||
o:value('scu', translate('SCU'))
|
||||
o:value('sct', translate('SCT'))
|
||||
|
|
|
@ -69,11 +69,13 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server
|
|||
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client
|
||||
bool "Include Shadowsocks Rust Client"
|
||||
depends on aarch64||arm||i386||mips||mipsel||x86_64
|
||||
depends on !(TARGET_x86_geode||TARGET_x86_legacy)
|
||||
default y if aarch64
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server
|
||||
bool "Include Shadowsocks Rust Server"
|
||||
depends on aarch64||arm||i386||mips||mipsel||x86_64
|
||||
depends on !(TARGET_x86_geode||TARGET_x86_legacy)
|
||||
default y if aarch64
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client
|
||||
|
|
|
@ -9,8 +9,8 @@ LUCI_TITLE:=LuCI based ipk store
|
|||
LUCI_DESCRIPTION:=luci-app-store is a ipk store developed by LinkEase team
|
||||
LUCI_DEPENDS:=+curl
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=0.1.0
|
||||
PKG_RELEASE:=9
|
||||
PKG_VERSION:=0.1.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=jjm2473 <jjm2473@gmail.com>
|
||||
|
||||
LUCI_BUILD_DEPENDS:=app-store-ui/host
|
||||
|
|
|
@ -57,6 +57,19 @@ wrapped_in_update() {
|
|||
opkg_wrap "$@"
|
||||
}
|
||||
|
||||
new_upgrade() {
|
||||
local metapkg=`echo "$@" | sed 's/ /\n/g' | grep -F app-meta-`
|
||||
if [ -n "$metapkg" ] && opkg_wrap info $metapkg | grep -qF not-installed ; then
|
||||
true
|
||||
else
|
||||
local idle_t=$((`date '+%s'` - `date -r ${IS_ROOT}/.last_force_ts '+%s' 2>/dev/null || echo '0'`))
|
||||
if [ $idle_t -gt 120 ]; then
|
||||
update && touch ${IS_ROOT}/.last_force_ts
|
||||
fi
|
||||
fi
|
||||
wrapped_in_update upgrade "$@"
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo "usage: is-opkg sub-command [arguments...]"
|
||||
echo "where sub-command is one of:"
|
||||
|
@ -76,7 +89,7 @@ case $action in
|
|||
wrapped_in_update install "$@"
|
||||
;;
|
||||
"upgrade")
|
||||
wrapped_in_update upgrade "$@"
|
||||
new_upgrade "$@"
|
||||
;;
|
||||
"remove")
|
||||
opkg_wrap --autoremove --force-removal-of-dependent-packages remove "$@"
|
||||
|
|
Loading…
Reference in New Issue