From 800d193acb25a4406ca0b955e7117b9f0429b76b Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:39:33 +0800 Subject: [PATCH] Bug fix --- v2rayN/ServiceLib/Handler/CoreHandler.cs | 2 +- v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs | 2 +- v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml | 1 + v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/v2rayN/ServiceLib/Handler/CoreHandler.cs b/v2rayN/ServiceLib/Handler/CoreHandler.cs index c16f3fb9..ef0a8260 100644 --- a/v2rayN/ServiceLib/Handler/CoreHandler.cs +++ b/v2rayN/ServiceLib/Handler/CoreHandler.cs @@ -323,7 +323,7 @@ namespace ServiceLib.Handler if (isNeedSudo && _config.TunModeItem.LinuxSudoPwd.IsNotEmpty()) { - var pwd = AesUtils.Decrypt(_config.TunModeItem.LinuxSudoPwd); + var pwd = DesUtils.Decrypt(_config.TunModeItem.LinuxSudoPwd); await Task.Delay(10); await proc.StandardInput.WriteLineAsync(pwd); await Task.Delay(10); diff --git a/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs b/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs index 6dc63db0..87fc6237 100644 --- a/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs @@ -347,7 +347,7 @@ namespace ServiceLib.ViewModels _config.TunModeItem.EnableIPv6Address = TunEnableIPv6Address; if (TunLinuxSudoPassword != _config.TunModeItem.LinuxSudoPwd) { - _config.TunModeItem.LinuxSudoPwd = AesUtils.Encrypt(TunLinuxSudoPassword); + _config.TunModeItem.LinuxSudoPwd = DesUtils.Encrypt(TunLinuxSudoPassword); } //coreType diff --git a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml index 7f340867..717551e9 100644 --- a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml +++ b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml @@ -379,6 +379,7 @@ </Grid.ColumnDefinitions> <TextBlock + x:Name="tbAutoRun" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" diff --git a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs index 8642defe..8ecf012e 100644 --- a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs @@ -172,6 +172,7 @@ namespace v2rayN.Desktop.Views if (Utils.IsOSX()) { + tbAutoRun.IsVisible = false; togAutoRun.IsVisible = false; //TODO }