mirror of
https://github.com/kenzok8/openwrt-packages
synced 2025-01-05 11:36:38 +08:00
update 2023-04-18 20:29:51
This commit is contained in:
parent
9816d2e96e
commit
d7fe7703cb
@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gn
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://gn.googlesource.com/gn.git
|
||||
PKG_SOURCE_DATE:=2023-02-17
|
||||
PKG_SOURCE_VERSION:=b25a2f8c2d33f02082f0f258350f5e22c0973108
|
||||
PKG_SOURCE_DATE:=2023-04-05
|
||||
PKG_SOURCE_VERSION:=28b7b6c507eb808567e3aea446cd259f7691fddc
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
PKG_LICENSE:=BSD 3-Clause
|
||||
|
@ -3,7 +3,7 @@
|
||||
#ifndef OUT_LAST_COMMIT_POSITION_H_
|
||||
#define OUT_LAST_COMMIT_POSITION_H_
|
||||
|
||||
#define LAST_COMMIT_POSITION_NUM 2081
|
||||
#define LAST_COMMIT_POSITION "2081 (b25a2f8c2d33)"
|
||||
#define LAST_COMMIT_POSITION_NUM 2085
|
||||
#define LAST_COMMIT_POSITION "2085 (28b7b6c507eb)"
|
||||
|
||||
#endif // OUT_LAST_COMMIT_POSITION_H_
|
||||
|
@ -7,24 +7,38 @@ luci-app-advanced 高级设置,包括smartdns,openclash,防火墙,DHCP
|
||||
|
||||
![screenshots](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/说明2.jpg)
|
||||
|
||||
|
||||
|
||||
## 使用与授权相关说明
|
||||
|
||||
- 本人开源的所有源码,任何引用需注明本处出处,如需修改二次发布必告之本人,未经许可不得做于任何商用用途。
|
||||
|
||||
|
||||
# My other project
|
||||
|
||||
网络速度测试 :https://github.com/sirpdboy/NetSpeedTest
|
||||
- 网络速度测试 :https://github.com/sirpdboy/NetSpeedTest
|
||||
|
||||
定时设置插件 : https://github.com/sirpdboy/luci-app-autotimeset
|
||||
- 定时设置插件 : https://github.com/sirpdboy/luci-app-autotimeset
|
||||
|
||||
关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
- 关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
|
||||
opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd
|
||||
- opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd
|
||||
|
||||
opentoks 主题: https://github.com/sirpdboy/luci-theme-opentoks [仿KOOLSAHRE主题]
|
||||
- kucat 主题: https://github.com/sirpdboy/luci-theme-kucat
|
||||
|
||||
btmob 主题: https://github.com/sirpdboy/luci-theme-btmob
|
||||
- 家长控制: https://github.com/sirpdboy/luci-theme-parentcontrol
|
||||
|
||||
系统高级设置 : https://github.com/sirpdboy/luci-app-advanced
|
||||
- 系统高级设置 : https://github.com/sirpdboy/luci-app-advanced
|
||||
|
||||
ddns-go动态域名: https://github.com/sirpdboy/luci-app-ddns-go
|
||||
- ddns-go动态域名: https://github.com/sirpdboy/luci-app-ddns-go
|
||||
|
||||
- 进阶设置(系统高级设置+主题设置kucat/agron/opentopd): https://github.com/sirpdboy/luci-app-advancedplus
|
||||
|
||||
- 设置向导: https://github.com/sirpdboy/luci-app-wizard
|
||||
|
||||
- 分区扩容: https://github.com/sirpdboy/luci-app-partexp
|
||||
|
||||
- lukcy大吉: https://github.com/sirpdboy/luci-app-lukcy
|
||||
|
||||
## 捐助
|
||||
|
||||
@ -37,4 +51,3 @@ ddns-go动态域名: https://github.com/sirpdboy/luci-app-ddns-go
|
||||
<a href="#readme">
|
||||
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="图飞了😂" title="返回顶部" align="right"/>
|
||||
</a>
|
||||
|
||||
|
@ -6,38 +6,6 @@ m.apply_on_parse=true
|
||||
s=m:section(TypedSection,"advanced")
|
||||
s.anonymous=true
|
||||
|
||||
if nixio.fs.access("/bin/nuc")then
|
||||
s:tab("mode",translate("模式设置"),translate("<br />可以在这里切换旁路由和正常模式,重置你的网络设置。<br /><font color=\"Red\"><strong>点击后会立即重启设备,没有确认过程,请谨慎操作!</strong></font><br/>"))
|
||||
o=s:taboption("mode",Button,"nucmode",translate("切换为旁路由模式"),translate("<font color=\"green\"><strong>本模式适合于单口和多网口主机,自动将网口全桥接好!<br />默认gateway是:192.168.1.1,ipaddr是192.168.1.2。用本机接口LAN接上级LAN当旁路由,主路由关闭DHCP服务。应用生效会重启软路由!</strong></font><br/>"))
|
||||
o.inputtitle = translate("Apply")
|
||||
o.inputstyle = "reset"
|
||||
o.write = function()
|
||||
luci.sys.exec("/bin/nuc &> /dev/null &")
|
||||
end
|
||||
o=s:taboption("mode",Button,"normalmode",translate("切换成路由模式"),translate("<font color=\"green\"><strong>本模式适合于有两个网口或以上的设备使用,如多网口软路由或者虚拟了两个以上网口的虚拟机使用!应用生效会重启软路由!。</strong></font><br/>"))
|
||||
o.inputtitle = translate("Apply")
|
||||
o.inputstyle = "reset"
|
||||
o.write = function()
|
||||
luci.sys.exec("/bin/normalmode &> /dev/null &")
|
||||
end
|
||||
|
||||
o=s:taboption("mode",Button,"ipmode6",translate("设置为IPV6网络"),translate("<font color=\"green\"><strong>点击应用切换到IPV6模式!保存应用后即刻有效!</strong></font><br/>"))
|
||||
|
||||
o.inputtitle = translate("Apply")
|
||||
o.inputstyle = "add"
|
||||
o.write = function(self, section)
|
||||
luci.sys.exec("ipmode6 &> /dev/null &")
|
||||
end
|
||||
|
||||
o=s:taboption("mode",Button,"ipmode4",translate("设置为IPV4网络"),translate("<font color=\"green\"><strong>点击应用切换到IPV4模式!保存应用后即刻有效!</strong></font><br/>"))
|
||||
|
||||
o.inputtitle = translate("Apply")
|
||||
o.inputstyle = "add"
|
||||
o.write = function(self, section)
|
||||
luci.sys.exec("ipmode4 &> /dev/null &")
|
||||
end
|
||||
|
||||
end
|
||||
if nixio.fs.access("/etc/dnsmasq.conf")then
|
||||
|
||||
s:tab("dnsmasqconf",translate("dnsmasq"),translate("本页是配置/etc/dnsmasq.conf的文档内容。应用保存后自动重启生效"))
|
||||
@ -127,6 +95,7 @@ e.remove("/tmp/hosts.tmp")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if nixio.fs.access("/etc/config/arpbind")then
|
||||
s:tab("arpbindconf",translate("ARP绑定"),translate("本页是配置/etc/config/arpbind包含APR绑定MAC地址文档内容。应用保存后自动重启生效"))
|
||||
conf=s:taboption("arpbindconf",Value,"arpbindconf",nil,translate("开头的数字符号(#)或分号的每一行(;)被视为注释;删除(;)启用指定选项。"))
|
||||
@ -148,6 +117,7 @@ e.remove("/tmp/arpbind")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if nixio.fs.access("/etc/config/firewall")then
|
||||
s:tab("firewallconf",translate("防火墙"),translate("本页是配置/etc/config/firewall包含防火墙协议设置文档内容。应用保存后自动重启生效"))
|
||||
conf=s:taboption("firewallconf",Value,"firewallconf",nil,translate("开头的数字符号(#)或分号的每一行(;)被视为注释;删除(;)启用指定选项。"))
|
||||
@ -169,6 +139,7 @@ e.remove("/tmp/firewall")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if nixio.fs.access("/etc/config/mwan3")then
|
||||
s:tab("mwan3conf",translate("负载均衡"),translate("本页是配置/etc/config/mwan3包含负载均衡设置文档内容。应用保存后自动重启生效"))
|
||||
conf=s:taboption("mwan3conf",Value,"mwan3conf",nil,translate("开头的数字符号(#)或分号的每一行(;)被视为注释;删除(;)启用指定选项。"))
|
||||
@ -211,6 +182,7 @@ e.remove("/tmp/dhcp")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if nixio.fs.access("/etc/config/ddns")then
|
||||
s:tab("ddnsconf",translate("DDNS"),translate("本页是配置/etc/config/ddns包含动态域名设置文档内容。应用保存后自动重启生效"))
|
||||
conf=s:taboption("ddnsconf",Value,"ddnsconf",nil,translate("开头的数字符号(#)或分号的每一行(;)被视为注释;删除(;)启用指定选项。"))
|
||||
@ -233,48 +205,50 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
if nixio.fs.access("/etc/config/timecontrol")then
|
||||
s:tab("timecontrolconf",translate("时间控制"),translate("本页是配置/etc/config/timecontrol包含上网时间控制配置文档内容。应用保存后自动重启生效"))
|
||||
conf=s:taboption("timecontrolconf",Value,"timecontrolconf",nil,translate("开头的数字符号(#)或分号的每一行(;)被视为注释;删除(;)启用指定选项。"))
|
||||
if nixio.fs.access("/etc/config/parentcontrol")then
|
||||
s:tab("parentcontrolconf",translate("家长控制"),translate("本页是配置/etc/config/parentcontrol包含家长控制配置文档内容。应用保存后自动重启生效"))
|
||||
conf=s:taboption("parentcontrolconf",Value,"parentcontrolconf",nil,translate("开头的数字符号(#)或分号的每一行(;)被视为注释;删除(;)启用指定选项。"))
|
||||
conf.template="cbi/tvalue"
|
||||
conf.rows=20
|
||||
conf.wrap="off"
|
||||
conf.cfgvalue=function(t,t)
|
||||
return e.readfile("/etc/config/timecontrol")or""
|
||||
return e.readfile("/etc/config/parentcontrol")or""
|
||||
end
|
||||
conf.write=function(a,a,t)
|
||||
if t then
|
||||
t=t:gsub("\r\n?","\n")
|
||||
e.writefile("/tmp/timecontrol",t)
|
||||
if(luci.sys.call("cmp -s /tmp/timecontrol /etc/config/timecontrol")==1)then
|
||||
e.writefile("/etc/config/timecontrol",t)
|
||||
luci.sys.call("/etc/init.d/timecontrol restart >/dev/null")
|
||||
e.writefile("/tmp/parentcontrol",t)
|
||||
if(luci.sys.call("cmp -s /tmp/parentcontrol /etc/config/parentcontrol")==1)then
|
||||
e.writefile("/etc/config/parentcontrol",t)
|
||||
luci.sys.call("/etc/init.d/parentcontrol restart >/dev/null")
|
||||
end
|
||||
e.remove("/tmp/timecontrol")
|
||||
e.remove("/tmp/parentcontrol")
|
||||
end
|
||||
end
|
||||
end
|
||||
if nixio.fs.access("/etc/config/rebootschedule")then
|
||||
s:tab("rebootscheduleconf",translate("定时设置"),translate("本页是配置/etc/config/rebootschedule包含定时设置任务配置文档内容。应用保存后自动重启生效"))
|
||||
conf=s:taboption("rebootscheduleconf",Value,"rebootscheduleconf",nil,translate("开头的数字符号(#)或分号的每一行(;)被视为注释;删除(;)启用指定选项。"))
|
||||
|
||||
if nixio.fs.access("/etc/config/autotimeset")then
|
||||
s:tab("autotimesetconf",translate("定时设置"),translate("本页是配置/etc/config/autotimeset包含定时设置任务配置文档内容。应用保存后自动重启生效"))
|
||||
conf=s:taboption("autotimesetconf",Value,"autotimesetconf",nil,translate("开头的数字符号(#)或分号的每一行(;)被视为注释;删除(;)启用指定选项。"))
|
||||
conf.template="cbi/tvalue"
|
||||
conf.rows=20
|
||||
conf.wrap="off"
|
||||
conf.cfgvalue=function(t,t)
|
||||
return e.readfile("/etc/config/rebootschedule")or""
|
||||
return e.readfile("/etc/config/autotimeset")or""
|
||||
end
|
||||
conf.write=function(a,a,t)
|
||||
if t then
|
||||
t=t:gsub("\r\n?","\n")
|
||||
e.writefile("/tmp/rebootschedule",t)
|
||||
if(luci.sys.call("cmp -s /tmp/rebootschedule /etc/config/rebootschedule")==1)then
|
||||
e.writefile("/etc/config/rebootschedule",t)
|
||||
luci.sys.call("/etc/init.d/rebootschedule restart >/dev/null")
|
||||
e.writefile("/tmp/autotimeset",t)
|
||||
if(luci.sys.call("cmp -s /tmp/autotimeset /etc/config/autotimeset")==1)then
|
||||
e.writefile("/etc/config/autotimeset",t)
|
||||
luci.sys.call("/etc/init.d/autotimeset restart >/dev/null")
|
||||
end
|
||||
e.remove("/tmp/rebootschedule")
|
||||
e.remove("/tmp/autotimeset")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if nixio.fs.access("/etc/config/wolplus")then
|
||||
s:tab("wolplusconf",translate("网络唤醒"),translate("本页是配置/etc/config/wolplus包含网络唤醒配置文档内容。应用保存后自动重启生效"))
|
||||
conf=s:taboption("wolplusconf",Value,"wolplusconf",nil,translate("开头的数字符号(#)或分号的每一行(;)被视为注释;删除(;)启用指定选项。"))
|
||||
@ -318,6 +292,29 @@ e.remove("/tmp/smartdns")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if nixio.fs.access("/etc/config/bypass")then
|
||||
s:tab("bypassconf",translate("BYPASS"),translate("本页是配置/etc/config/bypass包含bypass配置文档内容。应用保存后自动重启生效"))
|
||||
conf=s:taboption("bypassconf",Value,"bypassconf",nil,translate("开头的数字符号(#)或分号的每一行(;)被视为注释;删除(;)启用指定选项。"))
|
||||
conf.template="cbi/tvalue"
|
||||
conf.rows=20
|
||||
conf.wrap="off"
|
||||
conf.cfgvalue=function(t,t)
|
||||
return e.readfile("/etc/config/bypass")or""
|
||||
end
|
||||
conf.write=function(a,a,t)
|
||||
if t then
|
||||
t=t:gsub("\r\n?","\n")
|
||||
e.writefile("/tmp/bypass",t)
|
||||
if(luci.sys.call("cmp -s /tmp/bypass /etc/config/bypass")==1)then
|
||||
e.writefile("/etc/config/bypass",t)
|
||||
luci.sys.call("/etc/init.d/bypass restart >/dev/null")
|
||||
end
|
||||
e.remove("/tmp/bypass")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if nixio.fs.access("/etc/config/openclash")then
|
||||
s:tab("openclashconf",translate("openclash"),translate("本页是配置/etc/config/openclash的文档内容。应用保存后自动重启生效"))
|
||||
conf=s:taboption("openclashconf",Value,"openclashconf",nil,translate("开头的数字符号(#)或分号的每一行(;)被视为注释;删除(;)启用指定选项。"))
|
||||
@ -340,5 +337,4 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
return m
|
||||
|
@ -126,31 +126,42 @@ luci-app-lucky 动态域名ddns-go服务,替代socat主要用于公网IPv6 tcp/u
|
||||
![screenshots](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/lucky3.jpg)
|
||||
|
||||
|
||||
|
||||
|
||||
## 使用与授权相关说明
|
||||
|
||||
- 本人开源的所有源码,任何引用需注明本处出处,如需修改二次发布必告之本人,未经许可不得做于任何商用用途。
|
||||
|
||||
|
||||
# My other project
|
||||
|
||||
网络速度测试 :https://github.com/sirpdboy/NetSpeedTest
|
||||
- 网络速度测试 :https://github.com/sirpdboy/NetSpeedTest
|
||||
|
||||
定时设置插件 : https://github.com/sirpdboy/luci-app-autotimeset
|
||||
- 定时设置插件 : https://github.com/sirpdboy/luci-app-autotimeset
|
||||
|
||||
关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
- 关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
|
||||
opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd
|
||||
- opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd
|
||||
|
||||
opentoks 主题: https://github.com/sirpdboy/luci-theme-opentoks [仿KOOLSAHRE主题]
|
||||
- kucat 主题: https://github.com/sirpdboy/luci-theme-kucat
|
||||
|
||||
btmob 主题: https://github.com/sirpdboy/luci-theme-btmob
|
||||
- 家长控制: https://github.com/sirpdboy/luci-theme-parentcontrol
|
||||
|
||||
系统高级设置 : https://github.com/sirpdboy/luci-app-advanced
|
||||
- 系统高级设置 : https://github.com/sirpdboy/luci-app-advanced
|
||||
|
||||
DDNS-GO动态域名: https://github.com/sirpdboy/luci-app-DDNS-GO
|
||||
- ddns-go动态域名: https://github.com/sirpdboy/luci-app-ddns-go
|
||||
|
||||
Lucky(大吉): https://github.com/sirpdboy/luci-app-lucky
|
||||
- 进阶设置(系统高级设置+主题设置kucat/agron/opentopd): https://github.com/sirpdboy/luci-app-advancedplus
|
||||
|
||||
- 设置向导: https://github.com/sirpdboy/luci-app-wizard
|
||||
|
||||
- 分区扩容: https://github.com/sirpdboy/luci-app-partexp
|
||||
|
||||
- lukcy大吉: https://github.com/sirpdboy/luci-app-lukcy
|
||||
|
||||
## 捐助
|
||||
|
||||
-如果你觉得此项目对你有帮助,请捐助我们,以使项目能持续发展,更加完善。··请作者喝杯咖啡~~~**
|
||||
-你们的支持就是我的动力!**
|
||||
![screenshots](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/说明3.jpg)
|
||||
|
||||
| <img src="https://img.shields.io/badge/-支付宝-F5F5F5.svg" href="#赞助支持本项目-" height="25" alt="图飞了😂"/> | <img src="https://img.shields.io/badge/-微信-F5F5F5.svg" height="25" alt="图飞了😂" href="#赞助支持本项目-"/> |
|
||||
| :-----------------: | :-------------: |
|
||||
@ -159,4 +170,3 @@ Lucky(大吉): https://github.com/sirpdboy/luci-app-lucky
|
||||
<a href="#readme">
|
||||
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="图飞了😂" title="返回顶部" align="right"/>
|
||||
</a>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=4.64-3
|
||||
PKG_VERSION:=4.64-5
|
||||
PKG_RELEASE:=
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
@ -85,28 +85,31 @@ o = s:taboption("Main", Flag, "enabled", translate("Main switch"))
|
||||
o.rmempty = false
|
||||
|
||||
local auto_switch_tip
|
||||
local auto_switch_flag
|
||||
local shunt_remark
|
||||
local current_tcp_node = luci.sys.exec(string.format("[ -f '/tmp/etc/%s/id/TCP' ] && echo -n $(cat /tmp/etc/%s/id/TCP)", appname, appname))
|
||||
if current_tcp_node and current_tcp_node ~= "" and current_tcp_node ~= "nil" then
|
||||
local n = uci:get_all(appname, current_tcp_node)
|
||||
if n then
|
||||
if tonumber(m:get("@auto_switch[0]", "enable") or 0) == 1 then
|
||||
auto_switch_flag = ""
|
||||
if n.protocol == "_shunt" then
|
||||
local shunt_logic = tonumber(m:get("@auto_switch[0]", "shunt_logic"))
|
||||
if shunt_logic == 1 then
|
||||
auto_switch_flag = "default"
|
||||
elseif shunt_logic == 2 then
|
||||
auto_switch_flag = "main"
|
||||
end
|
||||
current_tcp_node = luci.sys.exec(string.format("[ -f '/tmp/etc/%s/id/TCP_%s' ] && echo -n $(cat /tmp/etc/%s/id/TCP_%s)", appname, auto_switch_flag, appname, auto_switch_flag))
|
||||
if current_tcp_node and current_tcp_node ~= "" and current_tcp_node ~= "nil" then
|
||||
n = uci:get_all(appname, current_tcp_node)
|
||||
if shunt_logic == 1 or shunt_logic == 2 then
|
||||
if shunt_logic == 1 then
|
||||
shunt_remark = "default"
|
||||
elseif shunt_logic == 2 then
|
||||
shunt_remark = "main"
|
||||
end
|
||||
current_tcp_node = luci.sys.exec(string.format("[ -f '/tmp/etc/%s/id/TCP_%s' ] && echo -n $(cat /tmp/etc/%s/id/TCP_%s)", appname, shunt_remark, appname, shunt_remark))
|
||||
if current_tcp_node and current_tcp_node ~= "" and current_tcp_node ~= "nil" then
|
||||
n = uci:get_all(appname, current_tcp_node)
|
||||
end
|
||||
end
|
||||
end
|
||||
local remarks = api.get_node_remarks(n)
|
||||
local url = api.url("node_config", n[".name"])
|
||||
auto_switch_tip = translatef("Current node: %s", string.format('<a href="%s">%s</a>', url, remarks)) .. "<br />"
|
||||
if n then
|
||||
local remarks = api.get_node_remarks(n)
|
||||
local url = api.url("node_config", n[".name"])
|
||||
auto_switch_tip = translatef("Current node: %s", string.format('<a href="%s">%s</a>', url, remarks)) .. "<br />"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -114,7 +117,7 @@ end
|
||||
---- TCP Node
|
||||
tcp_node = s:taboption("Main", ListValue, "tcp_node", "<a style='color: red'>" .. translate("TCP Node") .. "</a>")
|
||||
tcp_node:value("nil", translate("Close"))
|
||||
if auto_switch_flag == "" and auto_switch_tip then
|
||||
if not shunt_remark and auto_switch_tip then
|
||||
tcp_node.description = auto_switch_tip
|
||||
end
|
||||
|
||||
@ -171,7 +174,7 @@ if (has_v2ray or has_xray) and #nodes_table > 0 then
|
||||
o.cfgvalue = get_cfgvalue(v.id, "preproxy_enabled")
|
||||
o.write = get_write(v.id, "preproxy_enabled")
|
||||
|
||||
o = s:taboption("Main", ListValue, vid .. "-main_node", string.format('<a style="color:red">%s</a>', translate("Preproxy Node")), translate("Set the node to be used as a pre-proxy. Each rule (including <code>Default</code>) has a separate switch that controls whether this rule uses the pre-proxy or not."))
|
||||
o = s:taboption("Main", Value, vid .. "-main_node", string.format('<a style="color:red">%s</a>', translate("Preproxy Node")), translate("Set the node to be used as a pre-proxy. Each rule (including <code>Default</code>) has a separate switch that controls whether this rule uses the pre-proxy or not."))
|
||||
o:depends(vid .. "-preproxy_enabled", "1")
|
||||
for k1, v1 in pairs(balancing_list) do
|
||||
o:value(v1.id, v1.remark)
|
||||
@ -181,7 +184,7 @@ if (has_v2ray or has_xray) and #nodes_table > 0 then
|
||||
end
|
||||
o.cfgvalue = get_cfgvalue(v.id, "main_node")
|
||||
o.write = get_write(v.id, "main_node")
|
||||
if auto_switch_flag == "main" and auto_switch_tip then
|
||||
if shunt_remark == "main" and auto_switch_tip then
|
||||
o.description = auto_switch_tip
|
||||
end
|
||||
|
||||
@ -195,7 +198,7 @@ if (has_v2ray or has_xray) and #nodes_table > 0 then
|
||||
local id = e[".name"]
|
||||
local node_option = vid .. "-" .. id .. "_node"
|
||||
if id and e.remarks then
|
||||
o = s:taboption("Main", ListValue, node_option, string.format('* <a href="%s" target="_blank">%s</a>', api.url("shunt_rules", id), e.remarks))
|
||||
o = s:taboption("Main", Value, node_option, string.format('* <a href="%s" target="_blank">%s</a>', api.url("shunt_rules", id), e.remarks))
|
||||
o.cfgvalue = get_cfgvalue(v.id, id)
|
||||
o.write = get_write(v.id, id)
|
||||
o:depends("tcp_node", v.id)
|
||||
@ -221,7 +224,7 @@ if (has_v2ray or has_xray) and #nodes_table > 0 then
|
||||
end)
|
||||
|
||||
local id = "default_node"
|
||||
o = s:taboption("Main", ListValue, vid .. "-" .. id, string.format('* <a style="color:red">%s</a>', translate("Default")))
|
||||
o = s:taboption("Main", Value, vid .. "-" .. id, string.format('* <a style="color:red">%s</a>', translate("Default")))
|
||||
o.cfgvalue = get_cfgvalue(v.id, id)
|
||||
o.write = get_write(v.id, id)
|
||||
o:depends("tcp_node", v.id)
|
||||
@ -233,7 +236,7 @@ if (has_v2ray or has_xray) and #nodes_table > 0 then
|
||||
for k1, v1 in pairs(normal_list) do
|
||||
o:value(v1.id, v1.remark)
|
||||
end
|
||||
if auto_switch_flag == "default" and auto_switch_tip then
|
||||
if shunt_remark == "default" and auto_switch_tip then
|
||||
o.description = auto_switch_tip
|
||||
end
|
||||
|
||||
|
@ -175,7 +175,7 @@ probeInterval.description = translate("The interval between initiating probes. E
|
||||
if #nodes_table > 0 then
|
||||
o = s:option(Flag, "preproxy_enabled", translate("Preproxy"))
|
||||
o:depends("protocol", "_shunt")
|
||||
o = s:option(ListValue, "main_node", string.format('<a style="color:red">%s</a>', translate("Preproxy Node")), translate("Set the node to be used as a pre-proxy. Each rule (including <code>Default</code>) has a separate switch that controls whether this rule uses the pre-proxy or not."))
|
||||
o = s:option(Value, "main_node", string.format('<a style="color:red">%s</a>', translate("Preproxy Node")), translate("Set the node to be used as a pre-proxy. Each rule (including <code>Default</code>) has a separate switch that controls whether this rule uses the pre-proxy or not."))
|
||||
o:depends("preproxy_enabled", "1")
|
||||
for k, v in pairs(balancers_table) do
|
||||
o:value(v.id, v.remarks)
|
||||
@ -187,7 +187,7 @@ if #nodes_table > 0 then
|
||||
end
|
||||
uci:foreach(appname, "shunt_rules", function(e)
|
||||
if e[".name"] and e.remarks then
|
||||
o = s:option(ListValue, e[".name"], string.format('* <a href="%s" target="_blank">%s</a>', api.url("shunt_rules", e[".name"]), e.remarks))
|
||||
o = s:option(Value, e[".name"], string.format('* <a href="%s" target="_blank">%s</a>', api.url("shunt_rules", e[".name"]), e.remarks))
|
||||
o:value("nil", translate("Close"))
|
||||
o:value("_default", translate("Default"))
|
||||
o:value("_direct", translate("Direct Connection"))
|
||||
@ -217,7 +217,7 @@ shunt_tips.cfgvalue = function(t, n)
|
||||
end
|
||||
shunt_tips:depends("protocol", "_shunt")
|
||||
|
||||
local default_node = s:option(ListValue, "default_node", string.format('* <a style="color:red">%s</a>', translate("Default")))
|
||||
local default_node = s:option(Value, "default_node", string.format('* <a style="color:red">%s</a>', translate("Default")))
|
||||
default_node:depends("protocol", "_shunt")
|
||||
default_node:value("_direct", translate("Direct Connection"))
|
||||
default_node:value("_blackhole", translate("Blackhole"))
|
||||
|
@ -611,6 +611,44 @@ local function auto_get_arch()
|
||||
return util.trim(arch)
|
||||
end
|
||||
|
||||
function parseURL(url)
|
||||
if not url or url == "" then
|
||||
return nil
|
||||
end
|
||||
local pattern = "^(%w+)://"
|
||||
local protocol = url:match(pattern)
|
||||
|
||||
if not protocol then
|
||||
--error("Invalid URL: " .. url)
|
||||
return nil
|
||||
end
|
||||
|
||||
local auth_host_port = url:sub(#protocol + 4)
|
||||
local auth_pattern = "^([^@]+)@"
|
||||
local auth = auth_host_port:match(auth_pattern)
|
||||
local username, password
|
||||
|
||||
if auth then
|
||||
username, password = auth:match("^([^:]+):([^:]+)$")
|
||||
auth_host_port = auth_host_port:sub(#auth + 2)
|
||||
end
|
||||
|
||||
local host, port = auth_host_port:match("^([^:]+):(%d+)$")
|
||||
|
||||
if not host or not port then
|
||||
--error("Invalid URL: " .. url)
|
||||
return nil
|
||||
end
|
||||
|
||||
return {
|
||||
protocol = protocol,
|
||||
username = username,
|
||||
password = password,
|
||||
host = host,
|
||||
port = tonumber(port)
|
||||
}
|
||||
end
|
||||
|
||||
local default_file_tree = {
|
||||
x86_64 = "amd64",
|
||||
x86 = "386",
|
||||
|
@ -674,7 +674,26 @@ function gen_config(var)
|
||||
local preproxy_node_id = node["main_node"]
|
||||
local preproxy_node = preproxy_enabled and preproxy_node_id and uci:get_all(appname, preproxy_node_id) or nil
|
||||
local preproxy_is_balancer
|
||||
if preproxy_node and api.is_normal_node(preproxy_node) then
|
||||
|
||||
if not preproxy_node and preproxy_node_id and api.parseURL(preproxy_node_id) then
|
||||
local parsed1 = api.parseURL(preproxy_node_id)
|
||||
local _node = {
|
||||
type = "Xray",
|
||||
protocol = parsed1.protocol,
|
||||
username = parsed1.username,
|
||||
password = parsed1.password,
|
||||
address = parsed1.host,
|
||||
port = parsed1.port,
|
||||
transport = "tcp",
|
||||
stream_security = "none"
|
||||
}
|
||||
local preproxy_outbound = gen_outbound(flag, _node, preproxy_tag)
|
||||
if preproxy_outbound then
|
||||
table.insert(outbounds, preproxy_outbound)
|
||||
else
|
||||
preproxy_enabled = false
|
||||
end
|
||||
elseif preproxy_node and api.is_normal_node(preproxy_node) then
|
||||
local preproxy_outbound = gen_outbound(flag, preproxy_node, preproxy_tag)
|
||||
if preproxy_outbound then
|
||||
table.insert(outbounds, preproxy_outbound)
|
||||
@ -703,6 +722,23 @@ function gen_config(var)
|
||||
rule_outboundTag = "blackhole"
|
||||
elseif _node_id == "_default" and rule_name ~= "default" then
|
||||
rule_outboundTag = "default"
|
||||
elseif api.parseURL(_node_id) then
|
||||
local parsed1 = api.parseURL(_node_id)
|
||||
local _node = {
|
||||
type = "Xray",
|
||||
protocol = parsed1.protocol,
|
||||
username = parsed1.username,
|
||||
password = parsed1.password,
|
||||
address = parsed1.host,
|
||||
port = parsed1.port,
|
||||
transport = "tcp",
|
||||
stream_security = "none"
|
||||
}
|
||||
local _outbound = gen_outbound(flag, _node, rule_name)
|
||||
if _outbound then
|
||||
table.insert(outbounds, _outbound)
|
||||
rule_outboundTag = rule_name
|
||||
end
|
||||
elseif _node_id ~= "nil" then
|
||||
local _node = uci:get_all(appname, _node_id)
|
||||
if not _node then return nil, nil end
|
||||
|
@ -1519,8 +1519,8 @@ start() {
|
||||
elif [ "$use_nft" == 1 ] && [ -n "$(dnsmasq --version | grep 'Compile time options:.* nftset')" ]; then
|
||||
USE_TABLES="nftables"
|
||||
nftflag=1
|
||||
elif [ -z "$(command -v iptables-legacy || command -v iptables)" ] || [ -z "$(command -v ipset)" ]; then
|
||||
echolog "系统未安装iptables或ipset,无法透明代理!"
|
||||
elif [ -z "$(command -v iptables-legacy || command -v iptables)" ] || [ -z "$(command -v ipset)" ] || [ -z "$(dnsmasq --version | grep 'Compile time options:.* ipset')" ]; then
|
||||
echolog "系统未安装iptables或ipset或Dnsmasq没有开启ipset支持,无法透明代理!"
|
||||
else
|
||||
USE_TABLES="iptables"
|
||||
fi
|
||||
|
@ -285,6 +285,8 @@ load_acl() {
|
||||
[ -s "${TMP_ACL_PATH}/${sid}/var_udp_node" ] && udp_node=$(cat ${TMP_ACL_PATH}/${sid}/var_udp_node)
|
||||
[ -s "${TMP_ACL_PATH}/${sid}/var_tcp_port" ] && tcp_port=$(cat ${TMP_ACL_PATH}/${sid}/var_tcp_port)
|
||||
[ -s "${TMP_ACL_PATH}/${sid}/var_udp_port" ] && udp_port=$(cat ${TMP_ACL_PATH}/${sid}/var_udp_port)
|
||||
|
||||
[ "$udp_node" == "default" ] && [ "$UDP_NODE" = "nil" ] && [ "$TCP_UDP" = "1" ] && udp_node=$TCP_NODE
|
||||
[ -n "$tcp_node" ] && [ "$tcp_node" != "default" ] && tcp_node_remark=$(config_n_get $tcp_node remarks)
|
||||
[ -n "$udp_node" ] && [ "$udp_node" != "default" ] && udp_node_remark=$(config_n_get $udp_node remarks)
|
||||
|
||||
|
@ -296,6 +296,8 @@ load_acl() {
|
||||
[ -s "${TMP_ACL_PATH}/${sid}/var_udp_node" ] && udp_node=$(cat ${TMP_ACL_PATH}/${sid}/var_udp_node)
|
||||
[ -s "${TMP_ACL_PATH}/${sid}/var_tcp_port" ] && tcp_port=$(cat ${TMP_ACL_PATH}/${sid}/var_tcp_port)
|
||||
[ -s "${TMP_ACL_PATH}/${sid}/var_udp_port" ] && udp_port=$(cat ${TMP_ACL_PATH}/${sid}/var_udp_port)
|
||||
|
||||
[ "$udp_node" == "default" ] && [ "$UDP_NODE" = "nil" ] && [ "$TCP_UDP" = "1" ] && udp_node=$TCP_NODE
|
||||
[ -n "$tcp_node" ] && [ "$tcp_node" != "default" ] && tcp_node_remark=$(config_n_get $tcp_node remarks)
|
||||
[ -n "$udp_node" ] && [ "$udp_node" != "default" ] && udp_node_remark=$(config_n_get $udp_node remarks)
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -467,6 +467,7 @@
|
||||
103.130.152.0/24
|
||||
103.130.160.0/22
|
||||
103.130.228.0/22
|
||||
103.131.138.0/23
|
||||
103.131.152.0/22
|
||||
103.131.168.0/22
|
||||
103.131.176.0/22
|
||||
@ -485,6 +486,7 @@
|
||||
103.132.188.0/22
|
||||
103.132.208.0/22
|
||||
103.132.212.0/22
|
||||
103.132.22.0/23
|
||||
103.132.234.0/23
|
||||
103.132.60.0/22
|
||||
103.132.64.0/22
|
||||
@ -1894,6 +1896,7 @@
|
||||
103.247.168.0/22
|
||||
103.247.172.0/22
|
||||
103.247.176.0/22
|
||||
103.247.191.0/24
|
||||
103.247.200.0/22
|
||||
103.247.212.0/22
|
||||
103.248.0.0/23
|
||||
|
@ -394,6 +394,8 @@
|
||||
2400:ef40::/32
|
||||
2400:f480::/32
|
||||
2400:f5c0::/32
|
||||
2400:f6e0::/32
|
||||
2400:f720::/32
|
||||
2400:f7c0::/32
|
||||
2400:f840::/32
|
||||
2400:f980::/32
|
||||
|
@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=Design Theme
|
||||
LUCI_DEPENDS:=
|
||||
PKG_VERSION:=5.7.4-20230417
|
||||
PKG_VERSION:=5.7.5-20230418
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
@ -2707,7 +2707,7 @@ header > .container > .pull-right > * {
|
||||
border-bottom: var(--sectionBorder);
|
||||
border-left: var(--sectionBorder);
|
||||
border-right: var(--sectionBorder);
|
||||
/* background-color: var(--sectionbgColor); */
|
||||
background-color: var(--sectionbgColor);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -143,24 +143,38 @@ opentopd是一款基于luci-theme-material构建,使用HTML5、CSS3编写的Luci
|
||||
### 你可以随意使用其中的源码,但请注明出处。
|
||||
|
||||
|
||||
|
||||
|
||||
## 使用与授权相关说明
|
||||
|
||||
- 本人开源的所有源码,任何引用需注明本处出处,如需修改二次发布必告之本人,未经许可不得做于任何商用用途。
|
||||
|
||||
|
||||
# My other project
|
||||
|
||||
网络速度测试 :https://github.com/sirpdboy/NetSpeedTest
|
||||
- 网络速度测试 :https://github.com/sirpdboy/NetSpeedTest
|
||||
|
||||
定时设置插件 : https://github.com/sirpdboy/luci-app-autotimeset
|
||||
- 定时设置插件 : https://github.com/sirpdboy/luci-app-autotimeset
|
||||
|
||||
关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
- 关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
|
||||
opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd
|
||||
- opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd
|
||||
|
||||
opentoks 主题: https://github.com/sirpdboy/luci-theme-opentoks [仿KOOLSAHRE主题]
|
||||
- kucat 主题: https://github.com/sirpdboy/luci-theme-kucat
|
||||
|
||||
btmob 主题: https://github.com/sirpdboy/luci-theme-btmob
|
||||
- 家长控制: https://github.com/sirpdboy/luci-theme-parentcontrol
|
||||
|
||||
系统高级设置 : https://github.com/sirpdboy/luci-app-advanced
|
||||
- 系统高级设置 : https://github.com/sirpdboy/luci-app-advanced
|
||||
|
||||
ddns-go动态域名: https://github.com/sirpdboy/luci-app-ddns-go
|
||||
- ddns-go动态域名: https://github.com/sirpdboy/luci-app-ddns-go
|
||||
|
||||
- 进阶设置(系统高级设置+主题设置kucat/agron/opentopd): https://github.com/sirpdboy/luci-app-advancedplus
|
||||
|
||||
- 设置向导: https://github.com/sirpdboy/luci-app-wizard
|
||||
|
||||
- 分区扩容: https://github.com/sirpdboy/luci-app-partexp
|
||||
|
||||
- lukcy大吉: https://github.com/sirpdboy/luci-app-lukcy
|
||||
|
||||
## 捐助
|
||||
|
||||
@ -173,4 +187,3 @@ ddns-go动态域名: https://github.com/sirpdboy/luci-app-ddns-go
|
||||
<a href="#readme">
|
||||
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="图飞了😂" title="返回顶部" align="right"/>
|
||||
</a>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user