mirror of
https://github.com/proxysu/ProxySU.git
synced 2025-02-20 00:13:18 +03:00
修复MTProto可能潜在的Bug
This commit is contained in:
parent
bf39e88ace
commit
fd646363f5
@ -5,7 +5,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:ProxySU"
|
xmlns:local="clr-namespace:ProxySU"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="ProxySU - v2.4.6" Height="675" Width="650">
|
Title="ProxySU - v2.4.7" Height="675" Width="650">
|
||||||
<!--以下样式参考自:https://yq.aliyun.com/articles/331878
|
<!--以下样式参考自:https://yq.aliyun.com/articles/331878
|
||||||
https://docs.microsoft.com/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
|
https://docs.microsoft.com/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
|
@ -4910,10 +4910,25 @@ namespace ProxySU
|
|||||||
MainWindowsShowInfo(currentStatus);
|
MainWindowsShowInfo(currentStatus);
|
||||||
//读取生成的代理参数
|
//读取生成的代理参数
|
||||||
sshShellCommand = @"cat /usr/local/etc/mtg_info.json";
|
sshShellCommand = @"cat /usr/local/etc/mtg_info.json";
|
||||||
currentShellCommandResult = client.RunCommand(sshShellCommand).Result;
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
//结果保存在ReceiveConfigurationParameters[9]中
|
|
||||||
ReceiveConfigurationParameters[9] = currentShellCommandResult;
|
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连接
|
client.Disconnect();//断开服务器ssh连接
|
||||||
|
|
||||||
//Thread.Sleep(1000);
|
//Thread.Sleep(1000);
|
||||||
@ -5924,6 +5939,9 @@ namespace ProxySU
|
|||||||
sshShellCommand = @"rm -rf /usr/local/etc/mtg_info.json";
|
sshShellCommand = @"rm -rf /usr/local/etc/mtg_info.json";
|
||||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
|
sshShellCommand = @"rm -rf /usr/local/etc/mtg.sh";
|
||||||
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
sshShellCommand = @"find / -name mtg";
|
sshShellCommand = @"find / -name mtg";
|
||||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
|
@ -51,5 +51,5 @@ using System.Windows;
|
|||||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||||
// 方法是按如下所示使用“*”: :
|
// 方法是按如下所示使用“*”: :
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.4.6.0")]
|
[assembly: AssemblyVersion("2.4.7.0")]
|
||||||
[assembly: AssemblyFileVersion("2.4.6.0")]
|
[assembly: AssemblyFileVersion("2.4.7.0")]
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user