diff --git a/ProxySU/MainWindow.xaml b/ProxySU/MainWindow.xaml
index 544ce0d..b6401e3 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.16" Height="675" Width="650">
+ Title="ProxySU - v2.4.17" Height="675" Width="650">
@@ -32,11 +32,15 @@
+
+
+
+
-
+
@@ -51,7 +55,7 @@
-
+
@@ -219,10 +223,10 @@
-
+
-
+
@@ -243,10 +247,10 @@
-
+
-
+
@@ -415,7 +419,7 @@
-
+
@@ -467,7 +471,7 @@
-
+
diff --git a/ProxySU/MainWindow.xaml.cs b/ProxySU/MainWindow.xaml.cs
index 7b1d5a2..58ba99f 100644
--- a/ProxySU/MainWindow.xaml.cs
+++ b/ProxySU/MainWindow.xaml.cs
@@ -4842,44 +4842,54 @@ namespace ProxySU
if (functionResult == false) { FunctionResultErr(); client.Disconnect(); return; }
//****** "正在启动MTProto......" ******
- SetUpProgressBarProcessing(80);
- //currentStatus = Application.Current.FindResource("DisplayInstallInfo_StartSoft").ToString() + "MTProto......";
- //MainWindowsShowInfo(currentStatus);
+ SetUpProgressBarProcessing(70);
+ currentStatus = Application.Current.FindResource("DisplayInstallInfo_StartSoft").ToString() + "MTProto......";
+ MainWindowsShowInfo(currentStatus);
//启动MTProto服务
functionResult = SoftStartDetect(client, "mtg", @"/usr/local/bin/mtg");
if (functionResult == false) { FunctionResultErr(); client.Disconnect(); return; }
+ //****** "生成客户端配置......" ******
+ SetUpProgressBarProcessing(80);
+ currentStatus = Application.Current.FindResource("DisplayInstallInfo_GenerateClientConfig").ToString();
+ MainWindowsShowInfo(currentStatus);
+
+ sshShellCommand = @"systemctl stop mtg";
+ currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
+ sshShellCommand = @"cat /usr/local/etc/mtg.sh";
+ currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
+ sshShellCommand = currentShellCommandResult;
+ currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
+ Thread.Sleep(3000);
+ sshShellCommand = @"cat /usr/local/etc/mtg_info.json";
+ currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
+ ReceiveConfigurationParameters[9] = currentShellCommandResult;
+ if (String.IsNullOrEmpty(ReceiveConfigurationParameters[9]) == true)
+ {
+ Thread.Sleep(3000);
+ sshShellCommand = @"cat /usr/local/etc/mtg_info.json";
+ currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
+ ReceiveConfigurationParameters[9] = currentShellCommandResult;
+ }
+ sshShellCommand = @"pkill mtg";
+ currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
+ sshShellCommand = @"systemctl restart mtg";
+ currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
+
+ if (String.IsNullOrEmpty(ReceiveConfigurationParameters[9]) == true)
+ {
+ //***客户端配置获取失败!***
+ currentStatus = Application.Current.FindResource("DisplayInstallInfo_GetClientConfigFailed").ToString();
+ MainWindowsShowInfo(currentStatus);
+ FunctionResultErr();
+ client.Disconnect();
+ return;
+ }
//检测BBR,满足条件并启动 90--95
functionResult = DetectBBRandEnable(client);
if (functionResult == false) { FunctionResultErr(); client.Disconnect(); return; }
-
-
- //****** "生成客户端配置......" ******
- SetUpProgressBarProcessing(96);
- currentStatus = Application.Current.FindResource("DisplayInstallInfo_GenerateClientConfig").ToString();
- MainWindowsShowInfo(currentStatus);
- //读取生成的代理参数
- sshShellCommand = @"cat /usr/local/etc/mtg_info.json";
- currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
- ReceiveConfigurationParameters[9] = currentShellCommandResult;
- if (currentShellCommandResult.Contains(@"No such file or directory"))
- {
- sshShellCommand = @"systemctl stop mtg";
- currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
- sshShellCommand = @"cat /usr/local/etc/mtg.sh";
- currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
- sshShellCommand = currentShellCommandResult;
- currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
- sshShellCommand = @"cat /usr/local/etc/mtg_info.json";
- currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
- ReceiveConfigurationParameters[9] = currentShellCommandResult;
- sshShellCommand = @"pkill mtg";
- currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
- sshShellCommand = @"systemctl restart mtg";
- currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
- }
client.Disconnect();//断开服务器ssh连接
diff --git a/ProxySU/Properties/AssemblyInfo.cs b/ProxySU/Properties/AssemblyInfo.cs
index 0719fe1..56d8753 100644
--- a/ProxySU/Properties/AssemblyInfo.cs
+++ b/ProxySU/Properties/AssemblyInfo.cs
@@ -51,5 +51,5 @@ using System.Windows;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.4.16.0")]
-[assembly: AssemblyFileVersion("2.4.16.0")]
+[assembly: AssemblyVersion("2.4.17.0")]
+[assembly: AssemblyFileVersion("2.4.17.0")]
diff --git a/ProxySU/ResultClientInformation.xaml.cs b/ProxySU/ResultClientInformation.xaml.cs
index f9476a0..4728308 100644
--- a/ProxySU/ResultClientInformation.xaml.cs
+++ b/ProxySU/ResultClientInformation.xaml.cs
@@ -594,7 +594,9 @@ namespace ProxySU
string configSavePath = configDomainSavePath;
RadioButtonMtgIpv4.IsChecked = true;
+ //MessageBox.Show(MainWindow.ReceiveConfigurationParameters[9]);
JObject jObjectJson = JObject.Parse(MainWindow.ReceiveConfigurationParameters[9]);
+ //MessageBox.Show(jObjectJson.ToString());
if (jObjectJson["ipv4"]["tg_url"].ToString().Contains("nil") == false)
{
RadioButtonMtgIpv4.Visibility = Visibility.Visible;
diff --git a/ProxySU/Translations/ProxySU.en-US.xaml b/ProxySU/Translations/ProxySU.en-US.xaml
index 0090a85..f047bc3 100644
--- a/ProxySU/Translations/ProxySU.en-US.xaml
+++ b/ProxySU/Translations/ProxySU.en-US.xaml
@@ -345,6 +345,7 @@
The system does not meet the conditions for enabling BBR, and the enabling failed!
BBR is successfully activated!
Generate client configuration...
+ Failed to obtain client configuration!
The installation is successful, Enjoy it!!
Installation Failed!
An error occurred!
diff --git a/ProxySU/Translations/ProxySU.zh-CN.xaml b/ProxySU/Translations/ProxySU.zh-CN.xaml
index fc43b83..13b139a 100644
--- a/ProxySU/Translations/ProxySU.zh-CN.xaml
+++ b/ProxySU/Translations/ProxySU.zh-CN.xaml
@@ -350,6 +350,7 @@
系统不满足启用BBR的条件,启用失败!
BBR 启用成功!
生成客户端配置......
+ 客户端配置获取失败!
安装成功,祝你玩的愉快!!
安装失败!
发生错误!
diff --git a/ProxySU/Translations/ProxySU.zh-TW.xaml b/ProxySU/Translations/ProxySU.zh-TW.xaml
index b606651..3f18c9a 100644
--- a/ProxySU/Translations/ProxySU.zh-TW.xaml
+++ b/ProxySU/Translations/ProxySU.zh-TW.xaml
@@ -345,6 +345,7 @@
系統不滿足啟用BBR的條件,啟用失敗!
BBR 啟用成功!
生成客戶端配置......
+ 客戶端配置獲取失敗!
安裝成功,祝你玩的愉快! !
安裝失敗!
發生錯誤!
diff --git a/ProxySU/bin/Beta/Beta.zip b/ProxySU/bin/Beta/Beta.zip
index 58ad91d..6897ed0 100644
Binary files a/ProxySU/bin/Beta/Beta.zip and b/ProxySU/bin/Beta/Beta.zip differ