parent
8a48c68189
commit
0fc5e595b8
@ -235,11 +235,18 @@ local function fetch_rule(rule_name,rule_type,url,exclude_domain)
|
||||
if old_md5 ~= new_md5 then
|
||||
local count = line_count(file_tmp)
|
||||
if use_nft == "1" and (rule_type == "ip6" or rule_type == "ip4") then
|
||||
local set_name = "passwall_" ..rule_name
|
||||
local output_file = file_tmp.. ".nft"
|
||||
if rule_type == "ip4" then
|
||||
local set_name = "passwall_" ..rule_name
|
||||
if rule_name == "chnroute" then
|
||||
set_name = "passwall_chn"
|
||||
end
|
||||
gen_cache(set_name, "ipv4_addr", file_tmp, output_file)
|
||||
elseif rule_type == "ip6" then
|
||||
local set_name = "passwall_" ..rule_name
|
||||
if rule_name == "chnroute6" then
|
||||
set_name = "passwall_chn6"
|
||||
end
|
||||
gen_cache(set_name, "ipv6_addr", file_tmp, output_file)
|
||||
end
|
||||
luci.sys.exec(string.format('mv -f %s %s', output_file, rule_path .. "/" ..rule_name.. ".nft"))
|
||||
|
Loading…
Reference in New Issue
Block a user