mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-02-08 10:55:37 +08:00
节点状态记录是否检查到本地防火墙
This commit is contained in:
@@ -60,6 +60,11 @@ func (this *Firewalld) IsReady() bool {
|
||||
return this.isReady
|
||||
}
|
||||
|
||||
// IsMock 是否为模拟
|
||||
func (this *Firewalld) IsMock() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (this *Firewalld) AllowPort(port int, protocol string) error {
|
||||
if !this.isReady {
|
||||
return nil
|
||||
|
||||
@@ -10,6 +10,9 @@ type FirewallInterface interface {
|
||||
// IsReady 是否已准备被调用
|
||||
IsReady() bool
|
||||
|
||||
// IsMock 是否为模拟
|
||||
IsMock() bool
|
||||
|
||||
// AllowPort 允许端口
|
||||
AllowPort(port int, protocol string) error
|
||||
|
||||
|
||||
@@ -20,6 +20,11 @@ func (this *MockFirewall) IsReady() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsMock 是否为模拟
|
||||
func (this *MockFirewall) IsMock() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// AllowPort 允许端口
|
||||
func (this *MockFirewall) AllowPort(port int, protocol string) error {
|
||||
_ = port
|
||||
|
||||
Reference in New Issue
Block a user