Skip to content

Commit

Permalink
v2ray版本锁定在v4.32.1
Browse files Browse the repository at this point in the history
  • Loading branch information
proxysu committed Nov 20, 2020
1 parent b8dce71 commit bb222c4
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ProxySU/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<!--以下样式参考自:https://yq.aliyun.com/articles/331878
https://docs.microsoft.co/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
<Window.Resources>
Expand Down
42 changes: 41 additions & 1 deletion ProxySU/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,9 @@ private void StartSetUpV2ray(ConnectionInfo connectionInfo)
}

//下载安装脚本安装 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; }
Expand Down Expand Up @@ -1279,6 +1281,44 @@ private void StartSetUpV2ray(ConnectionInfo connectionInfo)
}

#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
Expand Down
Binary file modified ProxySU/bin/Beta/Beta.zip
Binary file not shown.

1 comment on commit bb222c4

@adminidor
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

听说有xray了?

Please sign in to comment.