mirror of
https://github.com/2dust/v2rayN.git
synced 2025-08-23 03:16:53 +00:00
Unify multiline logical expression formatting
This commit is contained in:
parent
79236ae134
commit
6f64f41930
1 changed files with 8 additions and 8 deletions
|
@ -187,9 +187,9 @@ public partial class CoreConfigV2rayService
|
||||||
foreach (var profile in new[] { subItem.PrevProfile, subItem.NextProfile })
|
foreach (var profile in new[] { subItem.PrevProfile, subItem.NextProfile })
|
||||||
{
|
{
|
||||||
var profileNode = await AppManager.Instance.GetProfileItemViaRemarks(profile);
|
var profileNode = await AppManager.Instance.GetProfileItemViaRemarks(profile);
|
||||||
if (profileNode is not null &&
|
if (profileNode is not null
|
||||||
Global.XraySupportConfigType.Contains(profileNode.ConfigType) &&
|
&& Global.XraySupportConfigType.Contains(profileNode.ConfigType)
|
||||||
Utils.IsDomain(profileNode.Address))
|
&& Utils.IsDomain(profileNode.Address))
|
||||||
{
|
{
|
||||||
directDomainList.Add(profileNode.Address);
|
directDomainList.Add(profileNode.Address);
|
||||||
}
|
}
|
||||||
|
@ -217,11 +217,11 @@ public partial class CoreConfigV2rayService
|
||||||
AddDnsServers(directDNSAddress, directGeositeList);
|
AddDnsServers(directDNSAddress, directGeositeList);
|
||||||
AddDnsServers(directDNSAddress, expectedDomainList, expectedIPs);
|
AddDnsServers(directDNSAddress, expectedDomainList, expectedIPs);
|
||||||
|
|
||||||
var useDirectDns = rules?.LastOrDefault() is { } lastRule &&
|
var useDirectDns = rules?.LastOrDefault() is { } lastRule
|
||||||
lastRule.OutboundTag == Global.DirectTag &&
|
&& lastRule.OutboundTag == Global.DirectTag
|
||||||
(lastRule.Port == "0-65535" ||
|
&& (lastRule.Port == "0-65535"
|
||||||
lastRule.Network == "tcp,udp" ||
|
|| lastRule.Network == "tcp,udp"
|
||||||
lastRule.Ip?.Contains("0.0.0.0/0") == true);
|
|| lastRule.Ip?.Contains("0.0.0.0/0") == true);
|
||||||
|
|
||||||
var defaultDnsServers = useDirectDns ? directDNSAddress : remoteDNSAddress;
|
var defaultDnsServers = useDirectDns ? directDNSAddress : remoteDNSAddress;
|
||||||
v2rayConfig.dns.servers.AddRange(defaultDnsServers);
|
v2rayConfig.dns.servers.AddRange(defaultDnsServers);
|
||||||
|
|
Loading…
Reference in a new issue