Firewall is the interface that all firewalls (iptables, nftables) must implement.
| 13 | |
| 14 | // Firewall is the interface that all firewalls (iptables, nftables) must implement. |
| 15 | type Firewall interface { |
| 16 | Init(uint16, string, string, bool) |
| 17 | Stop() |
| 18 | Name() string |
| 19 | IsRunning() bool |
| 20 | SetQueueNum(num uint16) |
| 21 | |
| 22 | SaveConfiguration(rawConfig string) error |
| 23 | |
| 24 | EnableInterception() |
| 25 | DisableInterception(bool) |
| 26 | QueueDNSResponses(bool, bool) (error, error) |
| 27 | QueueConnections(bool, bool) (error, error) |
| 28 | CleanRules(bool) |
| 29 | |
| 30 | AddSystemRules(bool, bool) |
| 31 | DeleteSystemRules(bool, bool, bool) |
| 32 | |
| 33 | Serialize() (*protocol.SysFirewall, error) |
| 34 | Deserialize(sysfw *protocol.SysFirewall) ([]byte, error) |
| 35 | |
| 36 | ErrorsChan() <-chan string |
| 37 | ErrChanEmpty() bool |
| 38 | } |
| 39 | |
| 40 | var ( |
| 41 | fw Firewall |
no outgoing calls
no test coverage detected