MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / FirewallInterface

Interface FirewallInterface

internal/firewalls/firewall_interface.go:6–33  ·  view source on GitHub ↗

FirewallInterface 防火墙接口

Source from the content-addressed store, hash-verified

4
5// FirewallInterface 防火墙接口
6type FirewallInterface interface {
7 // Name 名称
8 Name() string
9
10 // IsReady 是否已准备被调用
11 IsReady() bool
12
13 // IsMock 是否为模拟
14 IsMock() bool
15
16 // AllowPort 允许端口
17 AllowPort(port int, protocol string) error
18
19 // RemovePort 删除端口
20 RemovePort(port int, protocol string) error
21
22 // RejectSourceIP 拒绝某个源IP连接
23 RejectSourceIP(ip string, timeoutSeconds int) error
24
25 // DropSourceIP 丢弃某个源IP数据
26 // ip 要封禁的IP
27 // timeoutSeconds 过期时间
28 // async 是否异步
29 DropSourceIP(ip string, timeoutSeconds int, async bool) error
30
31 // RemoveSourceIP 删除某个源IP
32 RemoveSourceIP(ip string) error
33}

Callers 21

initFunction · 0.65
TestTable_AddChainFunction · 0.65
TestTable_AddSetFunction · 0.65
TestConn_AddTableFunction · 0.65
AddMethod · 0.65
ExistMethod · 0.65
ExistQuickMethod · 0.65
StatMethod · 0.65
IncreaseHitMethod · 0.65
removeMethod · 0.65
addToFirewalldMethod · 0.65
FirewallFunction · 0.65

Implementers 4

HTTPFirewallinternal/firewalls/firewall_http.go
Firewalldinternal/firewalls/firewall_firewalld.
MockFirewallinternal/firewalls/firewall_mock.go
NFTablesFirewallinternal/firewalls/firewall_nftables_o

Calls

no outgoing calls

Tested by

no test coverage detected