mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 00:09:16 +08:00
fix: 解决中文插件下 ufw 防火墙获取端口列表失败的问题 (#746)
This commit is contained in:
parent
549ccbe6a0
commit
5222388ba1
@ -75,7 +75,7 @@ func (f *Ufw) ListPort() ([]FireInfo, error) {
|
|||||||
var datas []FireInfo
|
var datas []FireInfo
|
||||||
isStart := false
|
isStart := false
|
||||||
for _, line := range portInfos {
|
for _, line := range portInfos {
|
||||||
if strings.HasPrefix(line, "--") {
|
if strings.HasPrefix(line, "-") {
|
||||||
isStart = true
|
isStart = true
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ func (f *Ufw) ListAddress() ([]FireInfo, error) {
|
|||||||
var datas []FireInfo
|
var datas []FireInfo
|
||||||
isStart := false
|
isStart := false
|
||||||
for _, line := range portInfos {
|
for _, line := range portInfos {
|
||||||
if strings.HasPrefix(line, "--") {
|
if strings.HasPrefix(line, "-") {
|
||||||
isStart = true
|
isStart = true
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user