diff --git a/ProxySU/MainWindow.xaml b/ProxySU/MainWindow.xaml index ce5dca3..a01fc97 100644 --- a/ProxySU/MainWindow.xaml +++ b/ProxySU/MainWindow.xaml @@ -30,12 +30,12 @@ - + - + diff --git a/ProxySU/MainWindow.xaml.cs b/ProxySU/MainWindow.xaml.cs index 48f3c0c..ac222c4 100644 --- a/ProxySU/MainWindow.xaml.cs +++ b/ProxySU/MainWindow.xaml.cs @@ -455,10 +455,18 @@ namespace ProxySU //下载官方安装脚本安装 - //client.RunCommand("curl -o /tmp/go.sh https://install.direct/go.sh"); - //client.RunCommand("bash /tmp/go.sh"); - //client.RunCommand("mv /etc/v2ray/config.json /etc/v2ray/config.json.1"); - client.RunCommand("mkdir /etc/v2ray"); + client.RunCommand("curl -o /tmp/go.sh https://install.direct/go.sh"); + string installResult= client.RunCommand("bash /tmp/go.sh").ToString(); + client.RunCommand("mv /etc/v2ray/config.json /etc/v2ray/config.json.1"); + if (!installResult.Contains("installed")) + { + MessageBox.Show("安装V2ray失败(官方脚本go.sh运行出错!)"); + client.Disconnect(); + currentStatus = "安装V2ray失败(官方脚本go.sh运行出错!)"; + textBlockName.Dispatcher.BeginInvoke(updateAction, textBlockName, progressBar, currentStatus); + return; + } + //client.RunCommand("mkdir /etc/v2ray"); //上传配置文件 currentStatus = "程序安装完毕,配置文件上传中......"; diff --git a/ProxySU/bin/Release/ProxySU.exe b/ProxySU/bin/Release/ProxySU.exe index e286043..54088d1 100644 Binary files a/ProxySU/bin/Release/ProxySU.exe and b/ProxySU/bin/Release/ProxySU.exe differ diff --git a/ProxySU/bin/Release/Release.zip b/ProxySU/bin/Release/Release.zip index bf2e814..0f9dd2f 100644 Binary files a/ProxySU/bin/Release/Release.zip and b/ProxySU/bin/Release/Release.zip differ