Files
small-packages/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/component.lua
T
2026-07-28 01:38:11 +08:00

31 lines
842 B
Lua

local m, s, o
m = SimpleForm(
"component_update",
translate("Component Update"),
translate("Check installed component versions and upgrade them online from the upstream release page.")
)
m.reset = false
m.submit = false
s = m:section(SimpleSection)
o = m:field(ListValue, "component_mirror", translate("Mirror URL"))
o:value("direct", translate("GitHub Direct"))
o:value("ghproxy", "mirror.ghproxy.com")
o:value("ghproxy_cc", "ghproxy.cc")
o:value("ghfast", "ghfast.top")
o:value("jsdelivr", "cdn.jsdelivr.net")
o.rmempty = false
o.cfgvalue = function(self)
return m.uci:get_first("shadowsocksr", "global", "component_mirror") or "direct"
end
o.write = function(self, section, value)
m.uci:set("shadowsocksr", "@global[0]", "component_mirror", value)
m.uci:commit("shadowsocksr")
end
s.template = "shadowsocksr/component"
return m