mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-07-28 09:22:05 +08:00
update 2026-05-19 01:55:56
This commit is contained in:
parent
53eda83da8
commit
0739c277d4
@ -1772,15 +1772,22 @@ function gen_config(var)
|
||||
end
|
||||
end
|
||||
end
|
||||
local dns_block_mode = "host"
|
||||
dns_block_mode = ""
|
||||
if dns_block_mode == "host" and dns_outboundTag == "blackhole" then
|
||||
for d_i, d_k in ipairs(value.domain) do
|
||||
dns.hosts[d_k] = "0.0.0.0"
|
||||
local dns_block = true -- If you do not want the blackhole rule to use DNS routing, please change it to `nil` or do not assign a value.
|
||||
if dns_outboundTag == "blackhole" then
|
||||
if dns_block then
|
||||
local dns_block_mode = "Hosts" -- use the Hosts mode to block.
|
||||
if dns_block_mode == "Hosts" then
|
||||
for d_i, d_k in ipairs(value.domain) do
|
||||
dns.hosts[d_k] = "0.0.0.0"
|
||||
end
|
||||
dns_server = nil
|
||||
end
|
||||
else
|
||||
dns_server = nil
|
||||
end
|
||||
dns_server = nil
|
||||
end
|
||||
if dns_server then
|
||||
dns_server.finalQuery = true
|
||||
dns_server.domains = value.domain
|
||||
if value.shunt_rule_name then
|
||||
dns_server.tag = "dns-in-" .. value.shunt_rule_name
|
||||
|
||||
Loading…
Reference in New Issue
Block a user