mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-11 18:27:51 +08:00
update 2026-08-16 16:21:47
This commit is contained in:
1 parent
d298a9b0c2
commit
9f4ff1bb27
21 files changed
+78
-115
No files matched your search
@@ -308,6 +308,7 @@ o.rmempty = false
|
||||
|
||||
s2 = m:section(TypedSection, "socks", translate("Socks Config"))
|
||||
s2.template = "cbi/tblsection"
|
||||
s2.sortable = true
|
||||
s2.anonymous = true
|
||||
s2.addremove = true
|
||||
s2.extedit = api.url("socks_config", "%s")
|
||||
@@ -383,4 +384,6 @@ end
|
||||
|
||||
m:appendTemplate("/global/footer", {shunt_list = api.jsonc.stringify(shunt_list)})
|
||||
|
||||
m:appendTemplate("/cbi/sortable", {sectiontype = s2.sectiontype})
|
||||
|
||||
return api.return_map(m)
|
||||
@@ -92,7 +92,7 @@ o.write = function(self, section, value)
|
||||
if old ~= value then
|
||||
m:foreach("nodes", function(e)
|
||||
if e["group"] and e["group"]:lower() == old:lower() then
|
||||
self:set(e[".name"], "group", value)
|
||||
self.map:set(e[".name"], "group", value)
|
||||
end
|
||||
if e["protocol"] and (e["protocol"] == "_balancing" or e["protocol"] == "_urltest") and e["node_group"] then
|
||||
local gs = ""
|
||||
@@ -104,7 +104,7 @@ o.write = function(self, section, value)
|
||||
end
|
||||
end
|
||||
gs = api.trim(gs)
|
||||
self:set(e[".name"], "node_group", gs)
|
||||
self.map:set(e[".name"], "node_group", gs)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,33 +0,0 @@
|
||||
if not api.is_finded("naive") then
|
||||
return
|
||||
end
|
||||
|
||||
-- [[ Naive ]]
|
||||
local m, s1 = ...
|
||||
local type_name = "Naiveproxy"
|
||||
|
||||
s1.fields["type"]:value(type_name, "NaiveProxy")
|
||||
|
||||
if s1.val["type"] ~= type_name then
|
||||
return
|
||||
end
|
||||
|
||||
local s = NamedSection(m, arg[1], "server")
|
||||
s.type_name = type_name
|
||||
s.option_prefix = "naive_"
|
||||
|
||||
o = s:option(ListValue, "protocol", translate("Protocol"))
|
||||
o:value("https", translate("HTTPS"))
|
||||
o:value("quic", translate("QUIC"))
|
||||
|
||||
o = s:option(Value, "address", translate("Address (Support Domain Name)"))
|
||||
|
||||
o = s:option(Value, "port", translate("Port"))
|
||||
o.datatype = "port"
|
||||
|
||||
o = s:option(Value, "username", translate("Username"))
|
||||
|
||||
o = s:option(Value, "password", translate("Password"))
|
||||
o.password = true
|
||||
|
||||
api.luci_types(s1, s)
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user