mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-17 05:53:03 +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
|
||||
|
||||
@@ -114,7 +114,9 @@ s.anonymous = true
|
||||
s.addremove = true
|
||||
|
||||
s.create = function(e, t)
|
||||
TypedSection.create(e, api.gen_short_uuid())
|
||||
local uuid = api.gen_short_uuid(5)
|
||||
uuid = "haproxy_" .. uuid
|
||||
TypedSection.create(e, uuid)
|
||||
end
|
||||
|
||||
s.remove = function(self, section)
|
||||
|
||||
@@ -222,7 +222,9 @@ if has_xray then
|
||||
s_xray_noise.addremove = true
|
||||
|
||||
s_xray_noise.create = function(e, t)
|
||||
TypedSection.create(e, api.gen_short_uuid())
|
||||
local uuid = api.gen_short_uuid(5)
|
||||
uuid = "xray_noise_" .. uuid
|
||||
TypedSection.create(e, uuid)
|
||||
end
|
||||
|
||||
s_xray_noise.remove = function(self, section)
|
||||
|
||||
@@ -32,7 +32,7 @@ o.default = 1
|
||||
o.rmempty = false
|
||||
|
||||
local auto_switch_tip
|
||||
local current_node = api.get_cache_var("socks_" .. arg[1])
|
||||
local current_node = api.get_cache_var(arg[1])
|
||||
if current_node then
|
||||
local n = m:get(current_node)
|
||||
if n then
|
||||
|
||||
Reference in new issue
Block a user