From 5222388ba130fe4fb0161e44923926e9c00c070a Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Fri, 21 Apr 2023 16:45:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E4=B8=8B=20ufw=20=E9=98=B2=E7=81=AB=E5=A2=99?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=AB=AF=E5=8F=A3=E5=88=97=E8=A1=A8=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98=20(#746)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/utils/firewall/client/ufw.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/utils/firewall/client/ufw.go b/backend/utils/firewall/client/ufw.go index 70f2197d0..72c7d1f93 100644 --- a/backend/utils/firewall/client/ufw.go +++ b/backend/utils/firewall/client/ufw.go @@ -75,7 +75,7 @@ func (f *Ufw) ListPort() ([]FireInfo, error) { var datas []FireInfo isStart := false for _, line := range portInfos { - if strings.HasPrefix(line, "--") { + if strings.HasPrefix(line, "-") { isStart = true continue } @@ -100,7 +100,7 @@ func (f *Ufw) ListAddress() ([]FireInfo, error) { var datas []FireInfo isStart := false for _, line := range portInfos { - if strings.HasPrefix(line, "--") { + if strings.HasPrefix(line, "-") { isStart = true continue }