Skip to content

Commit 41c406b

Browse files
authored
Revert "Fix xray wireguard chained proxies not working (#7113)" (#7194)
1 parent 30f7f2c commit 41c406b

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,6 @@ private async Task<int> GenDnsDomains(ProfileItem? node, JsonNode dns, DNSItem?
11831183
if (servers != null)
11841184
{
11851185
var domainList = new List<string>();
1186-
string? wireguardEndpointDomain = null;
11871186
if (Utils.IsDomain(node.Address))
11881187
{
11891188
domainList.Add(node.Address);
@@ -1210,14 +1209,7 @@ private async Task<int> GenDnsDomains(ProfileItem? node, JsonNode dns, DNSItem?
12101209
&& nextNode.ConfigType != EConfigType.TUIC
12111210
&& Utils.IsDomain(nextNode.Address))
12121211
{
1213-
if (nextNode.ConfigType == EConfigType.WireGuard)
1214-
{
1215-
wireguardEndpointDomain = nextNode.Address;
1216-
}
1217-
else
1218-
{
1219-
domainList.Add(nextNode.Address);
1220-
}
1212+
domainList.Add(nextNode.Address);
12211213
}
12221214
}
12231215
if (domainList.Count > 0)
@@ -1230,16 +1222,6 @@ private async Task<int> GenDnsDomains(ProfileItem? node, JsonNode dns, DNSItem?
12301222
};
12311223
servers.AsArray().Add(JsonUtils.SerializeToNode(dnsServer));
12321224
}
1233-
if (wireguardEndpointDomain is not null)
1234-
{
1235-
var dnsServer = new DnsServer4Ray()
1236-
{
1237-
address = string.IsNullOrEmpty(dNSItem?.DomainDNSAddress) ? Global.DomainDNSAddress.FirstOrDefault() : dNSItem?.DomainDNSAddress,
1238-
skipFallback = true,
1239-
domains = new() { wireguardEndpointDomain }
1240-
};
1241-
servers.AsArray().Insert(0, JsonUtils.SerializeToNode(dnsServer));
1242-
}
12431225
}
12441226
return await Task.FromResult(0);
12451227
}

0 commit comments

Comments
 (0)