diff --git a/ProxySU/MainWindow.xaml b/ProxySU/MainWindow.xaml index 622202a..18887b7 100644 --- a/ProxySU/MainWindow.xaml +++ b/ProxySU/MainWindow.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:ProxySU" mc:Ignorable="d" - Title="ProxySU - v2.4.24 Beta3" Height="675" Width="650"> + Title="ProxySU - v2.4.24" Height="675" Width="650"> diff --git a/ProxySU/MainWindow.xaml.cs b/ProxySU/MainWindow.xaml.cs index 6bc1b85..8e50dbb 100644 --- a/ProxySU/MainWindow.xaml.cs +++ b/ProxySU/MainWindow.xaml.cs @@ -1135,7 +1135,9 @@ namespace ProxySU } //下载安装脚本安装 37--40 - functionResult = ProxySoftInstall(client, @"V2Ray", @"https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh"); + //functionResult = ProxySoftInstall(client, @"V2Ray", @"https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh"); + functionResult = ProxySoftInstallV2ray(client, @"V2Ray", @"https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh"); + if (functionResult == false) { FunctionResultErr(); client.Disconnect(); return; } //functionResult = V2RayInstallScript(client); //if (functionResult == false) { FunctionResultErr(); client.Disconnect(); return; } @@ -1279,6 +1281,44 @@ namespace ProxySU } #region V2Ray专用调用函数 + //安装代理程序 37--40 + //functionResult = ProxySoftInstall(client,@"",@""); + //if (functionResult == false) { FunctionResultErr(); client.Disconnect(); return; } + private bool ProxySoftInstallV2ray(SshClient client, string proxyName, string downloadUrl) + { + //****** "系统环境检测完毕,符合安装要求,开始布署......" ****** + SetUpProgressBarProcessing(37); + currentStatus = Application.Current.FindResource("DisplayInstallInfo_StartInstalling").ToString(); + MainWindowsShowInfo(currentStatus); + + //****** "正在安装{proxyName}......" ****** + SetUpProgressBarProcessing(38); + currentStatus = Application.Current.FindResource("DisplayInstallInfo_StartInstallSoft").ToString() + $"{proxyName}......"; + MainWindowsShowInfo(currentStatus); + + saveShellScriptFileName = GenerateRandomScriptFileName(GenerateRandomStr(10)); + + sshShellCommand = $"curl -o {saveShellScriptFileName} {downloadUrl}"; + currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand); + + functionResult = FileCheckExists(client, $"{saveShellScriptFileName}"); + if (functionResult == false) + { + //***文件下载失败!*** + currentStatus = Application.Current.FindResource("DisplayInstallInfo_DownloadScriptFailed").ToString(); + MainWindowsShowInfo(currentStatus); + return false; + + } + sshShellCommand = $"yes | bash {saveShellScriptFileName} --version v4.32.1"; + currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand); + + sshShellCommand = $"rm -f {saveShellScriptFileName}"; + currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand); + + SetUpProgressBarProcessing(40); + return true; + } //生成V2Ray服务端配置 44--46 diff --git a/ProxySU/bin/Beta/Beta.zip b/ProxySU/bin/Beta/Beta.zip index fa15b14..444e301 100644 Binary files a/ProxySU/bin/Beta/Beta.zip and b/ProxySU/bin/Beta/Beta.zip differ