diff --git a/v2rayN/ServiceLib/Global.cs b/v2rayN/ServiceLib/Global.cs index e3c974cd..90f23a56 100644 --- a/v2rayN/ServiceLib/Global.cs +++ b/v2rayN/ServiceLib/Global.cs @@ -46,7 +46,7 @@ public const string ClashMixinYaml = NamespaceSample + "clash_mixin_yaml"; public const string ClashTunYaml = NamespaceSample + "clash_tun_yaml"; public const string LinuxAutostartConfig = NamespaceSample + "linux_autostart_config"; - + public const string DefaultSecurity = "auto"; public const string DefaultNetwork = "tcp"; public const string TcpHeaderHttp = "http"; diff --git a/v2rayN/ServiceLib/Handler/AutoStartupHandler.cs b/v2rayN/ServiceLib/Handler/AutoStartupHandler.cs index acfd3e41..97c86709 100644 --- a/v2rayN/ServiceLib/Handler/AutoStartupHandler.cs +++ b/v2rayN/ServiceLib/Handler/AutoStartupHandler.cs @@ -75,7 +75,7 @@ namespace ServiceLib.Handler { return; } - + var logonUser = WindowsIdentity.GetCurrent().Name; using var taskService = new Microsoft.Win32.TaskScheduler.TaskService(); var tasks = taskService.RootFolder.GetTasks(new Regex(taskName)); diff --git a/v2rayN/ServiceLib/Handler/ConfigHandler.cs b/v2rayN/ServiceLib/Handler/ConfigHandler.cs index 9ecddc36..e2cc4c45 100644 --- a/v2rayN/ServiceLib/Handler/ConfigHandler.cs +++ b/v2rayN/ServiceLib/Handler/ConfigHandler.cs @@ -1197,7 +1197,7 @@ namespace ServiceLib.Handler { await RemoveServerViaSubid(config, subid, isSub); } - + profileItem.Subid = subid; profileItem.IsSub = isSub; profileItem.PreSocksPort = preSocksPort; diff --git a/v2rayN/ServiceLib/Services/SpeedtestService.cs b/v2rayN/ServiceLib/Services/SpeedtestService.cs index d8411903..e257d421 100644 --- a/v2rayN/ServiceLib/Services/SpeedtestService.cs +++ b/v2rayN/ServiceLib/Services/SpeedtestService.cs @@ -2,6 +2,7 @@ using System.Diagnostics; using System.Net; using System.Net.Sockets; + namespace ServiceLib.Services { public class SpeedtestService @@ -85,7 +86,7 @@ namespace ServiceLib.Services private void ExitLoop(string x) { - if(_exitLoop) return; + if (_exitLoop) return; _exitLoop = true; UpdateFunc("", ResUI.SpeedtestingStop); } diff --git a/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs b/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs index 9d254556..79f2d29f 100644 --- a/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs @@ -273,7 +273,7 @@ namespace ServiceLib.ViewModels try { Locator.Current.GetService()?.UpdateStatistics(update); - if ((update.ProxyUp + update.ProxyDown) > 0 && DateTime.Now.Second % 3 == 0) + if ((update.ProxyUp + update.ProxyDown) > 0 && DateTime.Now.Second % 9 == 0) { Locator.Current.GetService()?.UpdateStatistics(update); } diff --git a/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs b/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs index 66d38ddc..507fff0e 100644 --- a/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs @@ -686,7 +686,6 @@ namespace ServiceLib.ViewModels //ClearTestResult(); _ = new SpeedtestService(_config, lstSelecteds, actionType, UpdateSpeedtestHandler); - } public void ServerSpeedtestStop() diff --git a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs index 66026a6a..5fea12c0 100644 --- a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs @@ -174,7 +174,7 @@ namespace v2rayN.Desktop.Views { switch (action) { - case EViewAction.CloseWindow: + case EViewAction.CloseWindow: this.Close(true); break;