Update On Wed May 7 20:36:26 CEST 2025

This commit is contained in:
github-action[bot]
2025-05-07 20:36:27 +02:00
parent 03f75d0701
commit ae3ff8271e
86 changed files with 2655 additions and 682 deletions
@@ -122,6 +122,11 @@ function base64Decode(text)
end
end
function base64Encode(text)
local result = nixio.bin.b64encode(text)
return result
end
--提取URL中的域名和端口(no ip)
function get_domain_port_from_url(url)
local scheme, domain, port = string.match(url, "^(https?)://([%w%.%-]+):?(%d*)")
@@ -1222,11 +1227,16 @@ function luci_types(id, m, s, type_name, option_prefix)
end
s.fields[key].cfgvalue = function(self, section)
if self.rewrite_option then
return m:get(section, self.rewrite_option)
-- 添加自定义 custom_cfgvalue 属性,如果有自定义的 custom_cfgvalue 函数,则使用自定义的 cfgvalue 逻辑
if self.custom_cfgvalue then
return self:custom_cfgvalue(section)
else
if self.option:find(option_prefix) == 1 then
return m:get(section, self.option:sub(1 + #option_prefix))
if self.rewrite_option then
return m:get(section, self.rewrite_option)
else
if self.option:find(option_prefix) == 1 then
return m:get(section, self.option:sub(1 + #option_prefix))
end
end
end
end