1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-29 00:26:09 +03:00

优化 CentOS7 防火墙下acme.sh可能出现的潜在错误

This commit is contained in:
ProxySU 2020-11-04 21:36:07 +08:00
parent cb55c6f92d
commit 78d299f5c7
4 changed files with 5 additions and 2 deletions

View File

@ -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-beta4" Height="675" Width="650">
Title="ProxySU - v2.4.19-beta5" 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>

View File

@ -8024,6 +8024,9 @@ namespace ProxySU
string openFireWallPort = ReceiveConfigurationParameters[1];
if (String.IsNullOrEmpty(client.RunCommand("command -v firewall-cmd").Result) == false)
{
//有很奇怪的vps主机在firewalld未运行时端口是关闭的无法访问。所以要先启动firewalld
sshShellCommand = @"systemctl restart firewalld";
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
if (String.Equals(openFireWallPort, "443"))
{
sshShellCommand = @"firewall-cmd --zone=public --add-port=80/tcp --permanent";

View File

@ -1724,7 +1724,7 @@ namespace ProxySU
if (File.Exists($"v2ray_config\\{plainSavePath}\\config.json"))
{
File.Move($"v2ray_config\\{plainSavePath}\\config.json", $"{configSavePath}\\config.json");
//Directory.Delete($"v2ray_config\\{plainSavePath}");
Directory.Delete($"v2ray_config\\{plainSavePath}");
}
using (StreamWriter sw = new StreamWriter($"{configSavePath}\\readme.txt"))

Binary file not shown.