mirror of
https://github.com/2dust/v2rayN.git
synced 2025-05-03 05:38:51 +00:00
optimize sing-box DNS
This commit is contained in:
parent
e4c65deda8
commit
07d2a27b5f
1 changed files with 13 additions and 16 deletions
|
@ -675,24 +675,21 @@ namespace v2rayN.Handler
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//Add the dns of the remote server domain
|
//Add the dns of the remote server domain
|
||||||
if (Utils.IsDomain(node.address))
|
if (dns4Sbox.rules is null)
|
||||||
{
|
{
|
||||||
if (dns4Sbox.rules is null)
|
dns4Sbox.rules = new();
|
||||||
{
|
|
||||||
dns4Sbox.rules = new();
|
|
||||||
}
|
|
||||||
dns4Sbox.servers.Add(new()
|
|
||||||
{
|
|
||||||
tag = "local_local",
|
|
||||||
address = "223.5.5.5",
|
|
||||||
detour = "direct"
|
|
||||||
});
|
|
||||||
dns4Sbox.rules.Add(new()
|
|
||||||
{
|
|
||||||
server = "local_local",
|
|
||||||
domain = new List<string>() { node.address }
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
dns4Sbox.servers.Add(new()
|
||||||
|
{
|
||||||
|
tag = "local_local",
|
||||||
|
address = "223.5.5.5",
|
||||||
|
detour = "direct"
|
||||||
|
});
|
||||||
|
dns4Sbox.rules.Add(new()
|
||||||
|
{
|
||||||
|
server = "local_local",
|
||||||
|
outbound = "any"
|
||||||
|
});
|
||||||
|
|
||||||
singboxConfig.dns = dns4Sbox;
|
singboxConfig.dns = dns4Sbox;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue