diff --git a/v2rayN/ServiceLib/Models/V2rayConfig.cs b/v2rayN/ServiceLib/Models/V2rayConfig.cs index d080d14c..2e5ed4b4 100644 --- a/v2rayN/ServiceLib/Models/V2rayConfig.cs +++ b/v2rayN/ServiceLib/Models/V2rayConfig.cs @@ -210,6 +210,7 @@ public class DnsServer4Ray { public string? address { get; set; } public List? domains { get; set; } + public bool? skipFallback { get; set; } } public class Routing4Ray diff --git a/v2rayN/ServiceLib/Sample/dns_v2ray_normal b/v2rayN/ServiceLib/Sample/dns_v2ray_normal index 9aecbd6e..3f9c8b22 100644 --- a/v2rayN/ServiceLib/Sample/dns_v2ray_normal +++ b/v2rayN/ServiceLib/Sample/dns_v2ray_normal @@ -15,6 +15,7 @@ }, { "address": "223.5.5.5", + "skipFallback": true, "domains": [ "geosite:cn" ], diff --git a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs index 1bd23872..95511836 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs @@ -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));