Skip to content

Commit

Permalink
fix: 解决中文插件下 ufw 防火墙获取端口列表失败的问题 (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu authored Apr 21, 2023
1 parent 549ccbe commit 5222388
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/utils/firewall/client/ufw.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit 5222388

Please sign in to comment.