From cd77f1d882cc632865eadde3533307a3eefcb351 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Fri, 24 Jul 2026 16:57:19 +0800 Subject: [PATCH] Code clean --- v2rayN/ServiceLib/GlobalUsings.cs | 2 +- v2rayN/ServiceLib/Models/CoreConfigs/V2rayConfig.cs | 1 + .../ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs | 2 +- v2rayN/ServiceLib/ViewModels/AddServer2ViewModel.cs | 1 + v2rayN/ServiceLib/ViewModels/ProfilesSelectViewModel.cs | 1 + v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs | 1 + 6 files changed, 6 insertions(+), 2 deletions(-) diff --git a/v2rayN/ServiceLib/GlobalUsings.cs b/v2rayN/ServiceLib/GlobalUsings.cs index 6e051d80..39e67515 100644 --- a/v2rayN/ServiceLib/GlobalUsings.cs +++ b/v2rayN/ServiceLib/GlobalUsings.cs @@ -30,8 +30,8 @@ global using ServiceLib.Handler.Fmt; global using ServiceLib.Handler.SysProxy; global using ServiceLib.Helper; global using ServiceLib.Manager; -global using ServiceLib.Models.CoreConfigs; global using ServiceLib.Models.Configs; +global using ServiceLib.Models.CoreConfigs; global using ServiceLib.Models.Dto; global using ServiceLib.Models.Entities; global using ServiceLib.Resx; diff --git a/v2rayN/ServiceLib/Models/CoreConfigs/V2rayConfig.cs b/v2rayN/ServiceLib/Models/CoreConfigs/V2rayConfig.cs index ae415ac9..400d3acc 100644 --- a/v2rayN/ServiceLib/Models/CoreConfigs/V2rayConfig.cs +++ b/v2rayN/ServiceLib/Models/CoreConfigs/V2rayConfig.cs @@ -560,6 +560,7 @@ public class Sockopt4Ray [JsonPropertyName("interface")] public string? Interface { get; set; } + public HappyEyeballs4Ray? happyEyeballs { get; set; } } diff --git a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs index 9f4d7180..e83a1bf9 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs @@ -72,7 +72,7 @@ public partial class CoreConfigV2rayService tunInbound.settings.gateway.Add(address6); } tunInbound.settings.dns = [address.Split('/').First()]; - tunInbound.settings.autoSystemRoutingTable = ["0.0.0.0/0"]; + tunInbound.settings.autoSystemRoutingTable = ["0.0.0.0/0"]; var bindInterface = _config.CoreBasicItem.BindInterface?.TrimEx(); if (!bindInterface.IsNullOrEmpty()) { diff --git a/v2rayN/ServiceLib/ViewModels/AddServer2ViewModel.cs b/v2rayN/ServiceLib/ViewModels/AddServer2ViewModel.cs index b66f2118..14f8769b 100644 --- a/v2rayN/ServiceLib/ViewModels/AddServer2ViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/AddServer2ViewModel.cs @@ -3,6 +3,7 @@ namespace ServiceLib.ViewModels; public class AddServer2ViewModel : MyReactiveObject, ICloseable { public event EventHandler? RequestClose; + public Interaction BrowseConfigFileInteraction { get; } = new(); [Reactive] diff --git a/v2rayN/ServiceLib/ViewModels/ProfilesSelectViewModel.cs b/v2rayN/ServiceLib/ViewModels/ProfilesSelectViewModel.cs index 0f3e992d..430469e4 100644 --- a/v2rayN/ServiceLib/ViewModels/ProfilesSelectViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/ProfilesSelectViewModel.cs @@ -3,6 +3,7 @@ namespace ServiceLib.ViewModels; public class ProfilesSelectViewModel : MyReactiveObject, ICloseable { public event EventHandler? RequestClose; + public Interaction ProfilesFocusInteraction { get; } = new(); #region private prop diff --git a/v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs b/v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs index 949c77d8..1caf0620 100644 --- a/v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs @@ -3,6 +3,7 @@ namespace ServiceLib.ViewModels; public class RoutingRuleSettingViewModel : MyReactiveObject, ICloseable { public event EventHandler? RequestClose; + public Interaction ShowYesNoInteraction { get; } = new(); public Interaction SetClipboardDataInteraction { get; } = new(); public Interaction ReadTextFromClipboardInteraction { get; } = new();