Documentation
¶
Index ¶
- type IPTablesManager
- func (m *IPTablesManager) AddJumpRule(sourceIP, targetChain string) error
- func (m *IPTablesManager) AddRule(chainName string, rule OutboundRule) error
- func (m *IPTablesManager) ChainExists(chainName string) (bool, error)
- func (m *IPTablesManager) ClearAndDeleteChain(chainName string) error
- func (m *IPTablesManager) CreateContainerChain(containerChain string) error
- func (m *IPTablesManager) EnsureMainChainExists() error
- func (m *IPTablesManager) RemoveJumpRule(sourceIP, targetChain string) error
- func (m *IPTablesManager) RemoveJumpRuleByTargetChain(targetChain string) error
- func (m *IPTablesManager) VerifyRules(chainName string, rules []OutboundRule) error
- type IPTablesWrapper
- type Manager
- type OutboundRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPTablesManager ¶
type IPTablesManager struct {
// contains filtered or unexported fields
}
func (*IPTablesManager) AddJumpRule ¶
func (m *IPTablesManager) AddJumpRule(sourceIP, targetChain string) error
func (*IPTablesManager) AddRule ¶
func (m *IPTablesManager) AddRule(chainName string, rule OutboundRule) error
func (*IPTablesManager) ChainExists ¶
func (m *IPTablesManager) ChainExists(chainName string) (bool, error)
func (*IPTablesManager) ClearAndDeleteChain ¶
func (m *IPTablesManager) ClearAndDeleteChain(chainName string) error
func (*IPTablesManager) CreateContainerChain ¶
func (m *IPTablesManager) CreateContainerChain(containerChain string) error
func (*IPTablesManager) EnsureMainChainExists ¶
func (m *IPTablesManager) EnsureMainChainExists() error
func (*IPTablesManager) RemoveJumpRule ¶
func (m *IPTablesManager) RemoveJumpRule(sourceIP, targetChain string) error
func (*IPTablesManager) RemoveJumpRuleByTargetChain ¶
func (m *IPTablesManager) RemoveJumpRuleByTargetChain(targetChain string) error
func (*IPTablesManager) VerifyRules ¶
func (m *IPTablesManager) VerifyRules(chainName string, rules []OutboundRule) error
type IPTablesWrapper ¶
type IPTablesWrapper interface {
NewChain(table, chain string) error
ClearChain(table, chain string) error
DeleteChain(table, chain string) error
ChainExists(table, chain string) (bool, error)
Append(table, chain string, rulespec ...string) error
Insert(table, chain string, pos int, rulespec ...string) error
Delete(table, chain string, rulespec ...string) error
List(table, chain string) ([]string, error)
}
type Manager ¶
type Manager interface {
EnsureMainChainExists() error
CreateContainerChain(containerChain string) error
AddRule(chainName string, rule OutboundRule) error
AddJumpRule(sourceIP, targetChain string) error
RemoveJumpRule(sourceIP, targetChain string) error
ClearAndDeleteChain(chainName string) error
ChainExists(chainName string) (bool, error)
VerifyRules(chainName string, rules []OutboundRule) error
RemoveJumpRuleByTargetChain(targetChain string) error
}
Click to show internal directories.
Click to hide internal directories.