luci-app-passwall: sync upstream

last commit: 016568304a
This commit is contained in:
gitea-action 2025-01-15 22:30:21 +08:00
parent 5d19c6220a
commit 39debad2c7
2 changed files with 6 additions and 2 deletions

View File

@ -158,11 +158,13 @@ end
local file_vpslist = TMP_ACL_PATH .. "/vpslist" local file_vpslist = TMP_ACL_PATH .. "/vpslist"
if not is_file_nonzero(file_vpslist) then if not is_file_nonzero(file_vpslist) then
local f_out = io.open(file_vpslist, "w") local f_out = io.open(file_vpslist, "w")
local written_domains = {}
uci:foreach(appname, "nodes", function(t) uci:foreach(appname, "nodes", function(t)
local function process_address(address) local function process_address(address)
if address == "engage.cloudflareclient.com" then return end if address == "engage.cloudflareclient.com" then return end
if datatypes.hostname(address) then if datatypes.hostname(address) and not written_domains[address] then
f_out:write(address .. "\n") f_out:write(address .. "\n")
written_domains[address] = true
end end
end end
process_address(t.address) process_address(t.address)

View File

@ -274,11 +274,13 @@ end
local file_vpslist = TMP_ACL_PATH .. "/vpslist" local file_vpslist = TMP_ACL_PATH .. "/vpslist"
if not is_file_nonzero(file_vpslist) then if not is_file_nonzero(file_vpslist) then
local f_out = io.open(file_vpslist, "w") local f_out = io.open(file_vpslist, "w")
local written_domains = {}
uci:foreach(appname, "nodes", function(t) uci:foreach(appname, "nodes", function(t)
local function process_address(address) local function process_address(address)
if address == "engage.cloudflareclient.com" then return end if address == "engage.cloudflareclient.com" then return end
if datatypes.hostname(address) then if datatypes.hostname(address) and not written_domains[address] then
f_out:write(address .. "\n") f_out:write(address .. "\n")
written_domains[address] = true
end end
end end
process_address(t.address) process_address(t.address)