diff --git a/v2rayN/ServiceLib/Global.cs b/v2rayN/ServiceLib/Global.cs index 5478cd2a..e3ed209d 100644 --- a/v2rayN/ServiceLib/Global.cs +++ b/v2rayN/ServiceLib/Global.cs @@ -95,7 +95,7 @@ public class Global public const string PolicyGroupDefaultAllFilter = $"^(?!.*(?:{PolicyGroupExcludeKeywords})).*$"; - public static readonly List PolicyGroupDefaultFilterList = + public static readonly List PolicyGroupDefaultFilterList = [ // All nodes (exclude traffic/expiry info) PolicyGroupDefaultAllFilter, diff --git a/v2rayN/ServiceLib/Handler/Builder/NodeValidator.cs b/v2rayN/ServiceLib/Handler/Builder/NodeValidator.cs index a6adf1c2..65110b2a 100644 --- a/v2rayN/ServiceLib/Handler/Builder/NodeValidator.cs +++ b/v2rayN/ServiceLib/Handler/Builder/NodeValidator.cs @@ -81,7 +81,9 @@ public class NodeValidator { var transportError = ValidateSingboxTransport(item.ConfigType, net); if (transportError != null) + { v.Error(transportError); + } if (!Global.SingboxSupportConfigType.Contains(item.ConfigType)) { diff --git a/v2rayN/ServiceLib/Handler/ConfigHandler.cs b/v2rayN/ServiceLib/Handler/ConfigHandler.cs index eba4f4b5..3c587676 100644 --- a/v2rayN/ServiceLib/Handler/ConfigHandler.cs +++ b/v2rayN/ServiceLib/Handler/ConfigHandler.cs @@ -1040,8 +1040,8 @@ public static class ConfigHandler if (profileItem.StreamSecurity.IsNotEmpty()) { - if (profileItem.StreamSecurity != Global.StreamSecurity - && profileItem.StreamSecurity != Global.StreamSecurityReality) + if (profileItem.StreamSecurity is not Global.StreamSecurity + and not Global.StreamSecurityReality) { profileItem.StreamSecurity = string.Empty; } diff --git a/v2rayN/ServiceLib/Models/ServerTestItem.cs b/v2rayN/ServiceLib/Models/ServerTestItem.cs index beef2438..00e26b83 100644 --- a/v2rayN/ServiceLib/Models/ServerTestItem.cs +++ b/v2rayN/ServiceLib/Models/ServerTestItem.cs @@ -9,6 +9,6 @@ public class ServerTestItem public EConfigType ConfigType { get; set; } public bool AllowTest { get; set; } public int QueueNum { get; set; } - public required ProfileItem Profile { get; set; } + public ProfileItem Profile { get; set; } public ECoreType CoreType { get; set; } } diff --git a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs index afab27d9..f09d3ee9 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs @@ -243,7 +243,6 @@ public partial class CoreConfigSingboxService if (Utils.IsIpv6(predefined)) { rule.answer = new List { $"*. IN AAAA {predefined}" }; - } else { diff --git a/v2rayN/v2rayN.Desktop/Views/ClashConnectionsView.axaml.cs b/v2rayN/v2rayN.Desktop/Views/ClashConnectionsView.axaml.cs index 23722ad0..4bf5237b 100644 --- a/v2rayN/v2rayN.Desktop/Views/ClashConnectionsView.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/ClashConnectionsView.axaml.cs @@ -8,9 +8,9 @@ public partial class ClashConnectionsView : ReactiveUserControl