parent
5d19c6220a
commit
39debad2c7
@ -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)
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user