Skip to content

Commit cf59137

Browse files
authored
fix dns leak (#7110)
1 parent 519e588 commit cf59137

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

v2rayN/ServiceLib/Models/V2rayConfig.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ public class DnsServer4Ray
210210
{
211211
public string? address { get; set; }
212212
public List<string>? domains { get; set; }
213+
public bool? skipFallback { get; set; }
213214
}
214215

215216
public class Routing4Ray

v2rayN/ServiceLib/Sample/dns_v2ray_normal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
},
1616
{
1717
"address": "223.5.5.5",
18+
"skipFallback": true,
1819
"domains": [
1920
"geosite:cn"
2021
],

v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,6 +1185,7 @@ private async Task<int> GenDnsDomains(ProfileItem? node, JsonNode dns, DNSItem?
11851185
var dnsServer = new DnsServer4Ray()
11861186
{
11871187
address = string.IsNullOrEmpty(dNSItem?.DomainDNSAddress) ? Global.DomainDNSAddress.FirstOrDefault() : dNSItem?.DomainDNSAddress,
1188+
skipFallback = true,
11881189
domains = [node.Address]
11891190
};
11901191
servers.AsArray().Add(JsonUtils.SerializeToNode(dnsServer));

0 commit comments

Comments
 (0)