mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-25 06:36:08 +03:00
优化 CentOS7 防火墙下acme.sh可能出现的潜在错误
This commit is contained in:
parent
cb55c6f92d
commit
78d299f5c7
@ -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.19-beta4" Height="675" Width="650">
|
Title="ProxySU - v2.4.19-beta5" 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>
|
||||||
|
@ -8024,6 +8024,9 @@ namespace ProxySU
|
|||||||
string openFireWallPort = ReceiveConfigurationParameters[1];
|
string openFireWallPort = ReceiveConfigurationParameters[1];
|
||||||
if (String.IsNullOrEmpty(client.RunCommand("command -v firewall-cmd").Result) == false)
|
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"))
|
if (String.Equals(openFireWallPort, "443"))
|
||||||
{
|
{
|
||||||
sshShellCommand = @"firewall-cmd --zone=public --add-port=80/tcp --permanent";
|
sshShellCommand = @"firewall-cmd --zone=public --add-port=80/tcp --permanent";
|
||||||
|
@ -1724,7 +1724,7 @@ namespace ProxySU
|
|||||||
if (File.Exists($"v2ray_config\\{plainSavePath}\\config.json"))
|
if (File.Exists($"v2ray_config\\{plainSavePath}\\config.json"))
|
||||||
{
|
{
|
||||||
File.Move($"v2ray_config\\{plainSavePath}\\config.json", $"{configSavePath}\\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"))
|
using (StreamWriter sw = new StreamWriter($"{configSavePath}\\readme.txt"))
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user