fix dns leak

This commit is contained in:
DHR60 2025-04-11 22:26:01 +08:00
parent 666c874998
commit 5b8b68a973
3 changed files with 3 additions and 0 deletions
v2rayN/ServiceLib

View file

@ -210,6 +210,7 @@ public class DnsServer4Ray
{
public string? address { get; set; }
public List<string>? domains { get; set; }
public bool? skipFallback { get; set; }
}
public class Routing4Ray

View file

@ -15,6 +15,7 @@
},
{
"address": "223.5.5.5",
"skipFallback": true,
"domains": [
"geosite:cn"
],

View file

@ -1185,6 +1185,7 @@ public class CoreConfigV2rayService
var dnsServer = new DnsServer4Ray()
{
address = string.IsNullOrEmpty(dNSItem?.DomainDNSAddress) ? Global.DomainDNSAddress.FirstOrDefault() : dNSItem?.DomainDNSAddress,
skipFallback = true,
domains = [node.Address]
};
servers.AsArray().Add(JsonUtils.SerializeToNode(dnsServer));