update 2026-08-10 04:25:08

This commit is contained in:
action committed 2026-08-10 04:25:08 +08:00
1 parent bd1470df6e
commit ca3abc2331
15 files changed
+50 -90

No files matched your search

@@ -23,17 +23,6 @@ for k, e in ipairs(api.get_valid_nodes()) do
nodes_table[#nodes_table + 1] = e
end
local dynamicList_write = function(self, section, value)
local new_t = {}
if type(value) == "table" then
new_t = api.table_remove_duplicates(value)
else
new_t = { value }
end
local new_val = table.concat(new_t, " ")
return DynamicList.write(self, section, new_val)
end
local doh_validate = function(self, value, t)
if value ~= "" then
local flag = 0
@@ -168,7 +157,6 @@ sources.validate = function(self, value, t)
return value
end
sources.write = dynamicList_write
o = s:option(ListValue, "mode", translate("Mode"))
o:value("0", translate("No Proxy"))
@@ -167,19 +167,6 @@ source.validate = function(self, value, t)
return value
end
local dynamicList_write = function(self, section, value)
local new_t = {}
if type(value) == "table" then
new_t = api.table_remove_duplicates(value)
else
new_t = { value }
end
local new_val = table.concat(new_t, " ")
return DynamicList.write(self, section, new_val)
end
source.write = dynamicList_write
--[[
-- Too low usage rate, hidden
sourcePort = s:option(Value, "sourcePort", translate("Source port"))
@@ -116,12 +116,12 @@ if load_balancing_options then -- [[ Load balancing Start ]]
end
end
-- Reading the old DynamicList
function o.cfgvalue(self, section)
return m.uci:get_list(appname, section, "balancing_node") or {}
function o.custom_cfgvalue(self, section)
return table.concat(m:get(section, "balancing_node") or {}, " ")
end
-- Write-and-hold DynamicList
function o.custom_write(self, section, value)
local old = m.uci:get_list(appname, section, "balancing_node") or {}
local old = m:get(section, "balancing_node") or {}
local new, set = {}, {}
for v in value:gmatch("%S+") do
new[#new + 1] = v
@@ -129,13 +129,13 @@ if load_balancing_options then -- [[ Load balancing Start ]]
end
for _, v in ipairs(old) do
if not set[v] then
m.uci:set_list(appname, section, "balancing_node", new)
m:set(section, "balancing_node", new)
return
end
set[v] = nil
end
for _ in pairs(set) do
m.uci:set_list(appname, section, "balancing_node", new)
m:set(section, "balancing_node", new)
return
end
end
@@ -533,15 +533,6 @@ o:value("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384")
o:value("TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256")
o:value("TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256")
o:depends({ [_n("tls")] = true, [_n("reality")] = false })
function o.custom_write(self, section, value)
local new_t
if type(value) == "table" then
new_t = api.table_remove_duplicates(value)
else
new_t = { value }
end
m:set(section, self.option:sub(1 + #option_prefix), new_t)
end
o = s:option(TextValue, _n("reality_mldsa65Verify"), "ML-DSA-65 " .. translate("Public key"))
o.default = ""
@@ -118,12 +118,12 @@ if load_urltest_options then -- [[ URLTest Start ]]
end
end
-- Reading the old DynamicList
function o.cfgvalue(self, section)
return m.uci:get_list(appname, section, "urltest_node") or {}
function o.custom_cfgvalue(self, section)
return table.concat(m:get(section, "urltest_node") or {}, " ")
end
-- Write-and-hold DynamicList
function o.custom_write(self, section, value)
local old = m.uci:get_list(appname, section, "urltest_node") or {}
local old = m:get(section, "urltest_node") or {}
local new, set = {}, {}
for v in value:gmatch("%S+") do
new[#new + 1] = v
@@ -131,13 +131,13 @@ if load_urltest_options then -- [[ URLTest Start ]]
end
for _, v in ipairs(old) do
if not set[v] then
m.uci:set_list(appname, section, "urltest_node", new)
m:set(section, "urltest_node", new)
return
end
set[v] = nil
end
for _ in pairs(set) do
m.uci:set_list(appname, section, "urltest_node", new)
m:set(section, "urltest_node", new)
return
end
end
@@ -589,15 +589,6 @@ o:value("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384")
o:value("TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256")
o:value("TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256")
o:depends({ [_n("tls")] = true })
function o.custom_write(self, section, value)
local new_t
if type(value) == "table" then
new_t = api.table_remove_duplicates(value)
else
new_t = { value }
end
m:set(section, self.option:sub(1 + #option_prefix), new_t)
end
o = s:option(Flag, _n("ech"), translate("ECH"))
o.default = "0"
@@ -218,15 +218,6 @@ o:depends({ [_n("reality")] = true })
o = s:option(DynamicList, _n("reality_serverNames"), translate("serverNames"))
o:depends({ [_n("reality")] = true })
function o.custom_write(self, section, value)
local new_t = {}
if type(value) == "table" then
new_t = api.table_remove_duplicates(value)
else
new_t = { value }
end
m:set(section, self.option:sub(1 + #option_prefix), new_t)
end
o = s:option(ListValue, _n("alpn"), translate("alpn"))
o.default = "default"