From 41c406b84d4bda3e2fd2fc0f827bd420dbc20e7c Mon Sep 17 00:00:00 2001 From: DHR60 Date: Sun, 27 Apr 2025 09:37:46 +0800 Subject: [PATCH] Revert "Fix xray wireguard chained proxies not working (2dust#7113)" (#7194) --- .../CoreConfig/CoreConfigV2rayService.cs | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs index 7b940d07..618f5da8 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs @@ -1183,7 +1183,6 @@ public class CoreConfigV2rayService if (servers != null) { var domainList = new List(); - string? wireguardEndpointDomain = null; if (Utils.IsDomain(node.Address)) { domainList.Add(node.Address); @@ -1210,14 +1209,7 @@ public class CoreConfigV2rayService && nextNode.ConfigType != EConfigType.TUIC && Utils.IsDomain(nextNode.Address)) { - if (nextNode.ConfigType == EConfigType.WireGuard) - { - wireguardEndpointDomain = nextNode.Address; - } - else - { - domainList.Add(nextNode.Address); - } + domainList.Add(nextNode.Address); } } if (domainList.Count > 0) @@ -1230,16 +1222,6 @@ public class CoreConfigV2rayService }; servers.AsArray().Add(JsonUtils.SerializeToNode(dnsServer)); } - if (wireguardEndpointDomain is not null) - { - var dnsServer = new DnsServer4Ray() - { - address = string.IsNullOrEmpty(dNSItem?.DomainDNSAddress) ? Global.DomainDNSAddress.FirstOrDefault() : dNSItem?.DomainDNSAddress, - skipFallback = true, - domains = new() { wireguardEndpointDomain } - }; - servers.AsArray().Insert(0, JsonUtils.SerializeToNode(dnsServer)); - } } return await Task.FromResult(0); }