Merge branch '2dust:master' into accessibility

This commit is contained in:
Reza Bakhshi Laktasaraei 2025-04-27 19:58:29 +03:30 committed by GitHub
commit 9f9092e9c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1183,7 +1183,6 @@ public class CoreConfigV2rayService
if (servers != null)
{
var domainList = new List<string>();
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);
}