mirror of
https://github.com/2dust/v2rayN.git
synced 2025-05-14 04:08:07 +00:00
Revert "Fix xray wireguard chained proxies not working (2dust#7113)" (#7194)
Some checks failed
Some checks failed
This commit is contained in:
parent
30f7f2c563
commit
41c406b84d
1 changed files with 1 additions and 19 deletions
|
@ -1183,7 +1183,6 @@ public class CoreConfigV2rayService
|
||||||
if (servers != null)
|
if (servers != null)
|
||||||
{
|
{
|
||||||
var domainList = new List<string>();
|
var domainList = new List<string>();
|
||||||
string? wireguardEndpointDomain = null;
|
|
||||||
if (Utils.IsDomain(node.Address))
|
if (Utils.IsDomain(node.Address))
|
||||||
{
|
{
|
||||||
domainList.Add(node.Address);
|
domainList.Add(node.Address);
|
||||||
|
@ -1210,14 +1209,7 @@ public class CoreConfigV2rayService
|
||||||
&& nextNode.ConfigType != EConfigType.TUIC
|
&& nextNode.ConfigType != EConfigType.TUIC
|
||||||
&& Utils.IsDomain(nextNode.Address))
|
&& Utils.IsDomain(nextNode.Address))
|
||||||
{
|
{
|
||||||
if (nextNode.ConfigType == EConfigType.WireGuard)
|
domainList.Add(nextNode.Address);
|
||||||
{
|
|
||||||
wireguardEndpointDomain = nextNode.Address;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
domainList.Add(nextNode.Address);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (domainList.Count > 0)
|
if (domainList.Count > 0)
|
||||||
|
@ -1230,16 +1222,6 @@ public class CoreConfigV2rayService
|
||||||
};
|
};
|
||||||
servers.AsArray().Add(JsonUtils.SerializeToNode(dnsServer));
|
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);
|
return await Task.FromResult(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue