mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-04 22:53:56 +08:00
update 2026-08-15 04:24:58
This commit is contained in:
1 parent
a59171002f
commit
c9ba9e3a54
1983 files changed
+619
-1523517
No files matched your search
@@ -84,7 +84,7 @@ local function gen_include()
|
||||
end
|
||||
|
||||
local function start()
|
||||
local enabled = tonumber(uci:get(CONFIG, "@global[0]", "enable") or 0)
|
||||
local enabled = tonumber(api.uci_get_s("@global[0]", "enable") or 0)
|
||||
if enabled == nil or enabled == 0 then
|
||||
return
|
||||
end
|
||||
@@ -102,7 +102,7 @@ local function start()
|
||||
nft_file:write('flush chain inet fw4 PSW-SERVER\n')
|
||||
nft_file:write('insert rule inet fw4 input position 0 jump PSW-SERVER comment "PSW-SERVER"\n')
|
||||
end
|
||||
uci:foreach(CONFIG, "server", function(server)
|
||||
api.uci_foreach_s("server", function(server)
|
||||
local id = server[".name"]
|
||||
local enable = server.enable
|
||||
if enable and tonumber(enable) == 1 then
|
||||
@@ -125,7 +125,7 @@ local function start()
|
||||
if server.auth and server.auth == "1" then
|
||||
local user = nil
|
||||
if server.user then
|
||||
user = uci:get_all("passwall_server", server.user)
|
||||
user = api.uci_get_s(server.user)
|
||||
end
|
||||
local username = user and user.username or ""
|
||||
local password = user and user.password or ""
|
||||
|
||||
Reference in new issue
Block a user