mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-03 10:23:56 +08:00
update 2026-05-19 01:55:56
This commit is contained in:
1 parent
53eda83da8
commit
0739c277d4
1 file changed
+13
-6
@@ -1772,15 +1772,22 @@ function gen_config(var)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local dns_block_mode = "host"
|
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.
|
||||||
dns_block_mode = ""
|
if dns_outboundTag == "blackhole" then
|
||||||
if dns_block_mode == "host" and dns_outboundTag == "blackhole" then
|
if dns_block then
|
||||||
for d_i, d_k in ipairs(value.domain) do
|
local dns_block_mode = "Hosts" -- use the Hosts mode to block.
|
||||||
dns.hosts[d_k] = "0.0.0.0"
|
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
|
end
|
||||||
dns_server = nil
|
|
||||||
end
|
end
|
||||||
if dns_server then
|
if dns_server then
|
||||||
|
dns_server.finalQuery = true
|
||||||
dns_server.domains = value.domain
|
dns_server.domains = value.domain
|
||||||
if value.shunt_rule_name then
|
if value.shunt_rule_name then
|
||||||
dns_server.tag = "dns-in-" .. value.shunt_rule_name
|
dns_server.tag = "dns-in-" .. value.shunt_rule_name
|
||||||
|
|||||||
Reference in new issue
Block a user