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 c16f3fb9334..ef0a8260cac 100644 --- a/v2rayN/ServiceLib/Handler/CoreHandler.cs +++ b/v2rayN/ServiceLib/Handler/CoreHandler.cs @@ -323,7 +323,7 @@ private bool IsNeedSudo(ECoreType eCoreType) 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 6dc63db0bd5..87fc6237a84 100644 --- a/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs @@ -347,7 +347,7 @@ private async Task SaveSettingAsync() _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 7f3408670e2..717551e9edd 100644 --- a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml +++ b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml @@ -379,6 +379,7 @@