mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-16 21:43:33 +08:00
🏅 Sync 2026-08-09 09:19:32
This commit is contained in:
1 parent
ee62266d6b
commit
40a4a808cd
32 files changed
+313
-221
No files matched your search
@@ -65,7 +65,7 @@ m.uci:foreach(appname, "socks", function(s)
|
||||
remark = id .. " - " .. (remark or translate("Misconfigured"))
|
||||
}
|
||||
socks_list[#socks_list + 1] = {
|
||||
id = "Socks_" .. s[".name"],
|
||||
id = s[".name"],
|
||||
remark = translate("Socks Config") .. " " .. string.format("[%s %s]", s.port, translate("Port")),
|
||||
group = "Socks"
|
||||
}
|
||||
@@ -735,10 +735,10 @@ s2.anonymous = true
|
||||
s2.addremove = true
|
||||
s2.extedit = api.url("socks_config", "%s")
|
||||
function s2.create(e, t)
|
||||
local uuid = api.gen_short_uuid()
|
||||
t = uuid
|
||||
TypedSection.create(e, t)
|
||||
luci.http.redirect(e.extedit:format(t))
|
||||
local uuid = api.gen_short_uuid(5)
|
||||
uuid = "socks_" .. uuid
|
||||
TypedSection.create(e, uuid)
|
||||
luci.http.redirect(e.extedit:format(uuid))
|
||||
end
|
||||
function s2.remove(e, t)
|
||||
local socks = "Socks_" .. t
|
||||
@@ -805,7 +805,7 @@ o.group = {}
|
||||
o = s2:option(DummyValue, "now_node", translate("Current Node"))
|
||||
o.rawhtml = true
|
||||
o.cfgvalue = function(_, n)
|
||||
local current_node = api.get_cache_var("socks_" .. n)
|
||||
local current_node = api.get_cache_var(n)
|
||||
if current_node then
|
||||
local node = m:get(current_node)
|
||||
if node then
|
||||
|
||||
Reference in new issue
Block a user