feat: 完成 firewalld 与 ufw 列表显示

This commit is contained in:
ssongliu
2023-03-27 23:29:46 +08:00
committed by ssongliu
parent d5f446d7cf
commit c9d36d84f7
12 changed files with 332 additions and 187 deletions

View File

@@ -19,10 +19,10 @@ type FirewallClient interface {
func NewFirewallClient() (FirewallClient, error) {
// if _, err := os.Stat("/usr/sbin/firewalld"); err == nil {
return client.NewFirewalld()
// return client.NewFirewalld()
// }
// if _, err := os.Stat("/usr/sbin/ufw"); err == nil {
// return client.NewUfw()
return client.NewUfw()
// }
// return nil, errors.New("no such type")
}