From d5e1125c3684a5f32b2494da8bf0e4b4a0828634 Mon Sep 17 00:00:00 2001 From: autumn Date: Wed, 25 Aug 2021 11:12:47 +0800 Subject: [PATCH] fix issue 188 --- ProxySuper.Core/Services/ServiceBase.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ProxySuper.Core/Services/ServiceBase.cs b/ProxySuper.Core/Services/ServiceBase.cs index fcda9c0..7558a60 100644 --- a/ProxySuper.Core/Services/ServiceBase.cs +++ b/ProxySuper.Core/Services/ServiceBase.cs @@ -289,7 +289,7 @@ namespace ProxySuper.Core.Services #endregion // 安装证书 - Progress.Desc = ("安装Xray证书"); + Progress.Desc = ("安装TLS证书"); RunCmd($"mkdir -p {dirPath}"); RunCmd($"/root/.acme.sh/acme.sh --installcert -d {Settings.Domain} --certpath {certPath} --keypath {keyPath} --capath {certPath}"); @@ -676,6 +676,8 @@ namespace ProxySuper.Core.Services RunCmd("systemctl restart firewalld"); } + // 保持 ssh 端口开放 + RunCmd($"firewall-cmd --add-port={_host.Port}/tcp --permanent"); foreach (var port in portList) { RunCmd($"firewall-cmd --add-port={port}/tcp --permanent"); @@ -693,6 +695,8 @@ namespace ProxySuper.Core.Services RunCmd("echo y | ufw enable"); } + // 保持 ssh 端口开放 + RunCmd($"ufw allow {_host.Port}/tcp"); foreach (var port in portList) { RunCmd($"ufw allow {port}/tcp");