diff --git a/ProxySU/MainWindow.xaml b/ProxySU/MainWindow.xaml index fa7c779..15dc749 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.19-beta5" Height="675" Width="650"> + Title="ProxySU - v2.4.19-beta6" Height="675" Width="650"> <!--以下样式参考自:https://yq.aliyun.com/articles/331878 https://docs.microsoft.com/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview--> <Window.Resources> diff --git a/ProxySU/MainWindow.xaml.cs b/ProxySU/MainWindow.xaml.cs index 6481292..be460b2 100644 --- a/ProxySU/MainWindow.xaml.cs +++ b/ProxySU/MainWindow.xaml.cs @@ -7132,7 +7132,7 @@ namespace ProxySU #endregion - #region 资源工具标签页控制 + #region 标签页控制 private void ButtonWebBrowserHomePage_Click(object sender, RoutedEventArgs e) { @@ -7169,7 +7169,7 @@ namespace ProxySU } } - #endregion + #region 免翻网址资源标签 private void ButtonWebBrowserHomePageFreeWallURL_Click(object sender, RoutedEventArgs e) @@ -7249,7 +7249,8 @@ namespace ProxySU #endregion - + #endregion + #region 测试用代码 private void Button_Click(object sender, RoutedEventArgs e) { @@ -8025,8 +8026,17 @@ namespace ProxySU if (String.IsNullOrEmpty(client.RunCommand("command -v firewall-cmd").Result) == false) { //有很奇怪的vps主机,在firewalld未运行时,端口是关闭的,无法访问。所以要先启动firewalld - sshShellCommand = @"systemctl restart firewalld"; + //用于保证acme.sh申请证书成功 + sshShellCommand = @"firewall-cmd --state"; currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand); + + if(String.Equals(currentShellCommandResult.Trim(), "running") == false) + { + sshShellCommand = @"systemctl restart firewalld"; + currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand); + } + + if (String.Equals(openFireWallPort, "443")) { sshShellCommand = @"firewall-cmd --zone=public --add-port=80/tcp --permanent"; diff --git a/ProxySU/bin/Beta/Beta.zip b/ProxySU/bin/Beta/Beta.zip index 0533c2a..7456ae8 100644 Binary files a/ProxySU/bin/Beta/Beta.zip and b/ProxySU/bin/Beta/Beta.zip differ