Documentation ¶
Index ¶
- type InterfaceState
- type Manager
- func (m *Manager) AddNatRule(pair firewall.RouterPair) error
- func (m *Manager) AddPeerFiltering(ip net.IP, protocol firewall.Protocol, sPort *firewall.Port, ...) ([]firewall.Rule, error)
- func (m *Manager) AddRouteFiltering(sources []netip.Prefix, destination netip.Prefix, proto firewall.Protocol, ...) (firewall.Rule, error)
- func (m *Manager) AllowNetbird() error
- func (m *Manager) DeletePeerRule(rule firewall.Rule) error
- func (m *Manager) DeleteRouteRule(rule firewall.Rule) error
- func (m *Manager) Flush() error
- func (m *Manager) Init(stateManager *statemanager.Manager) error
- func (m *Manager) IsServerRouteSupported() bool
- func (m *Manager) RemoveNatRule(pair firewall.RouterPair) error
- func (m *Manager) Reset(stateManager *statemanager.Manager) error
- func (m *Manager) SetLegacyManagement(isLegacy bool) error
- type Rule
- type ShutdownState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InterfaceState ¶ added in v0.30.3
type InterfaceState struct { NameStr string `json:"name"` WGAddress iface.WGAddress `json:"wg_address"` UserspaceBind bool `json:"userspace_bind"` }
func (*InterfaceState) Address ¶ added in v0.30.3
func (i *InterfaceState) Address() device.WGAddress
func (*InterfaceState) IsUserspaceBind ¶ added in v0.30.3
func (i *InterfaceState) IsUserspaceBind() bool
func (*InterfaceState) Name ¶ added in v0.30.3
func (i *InterfaceState) Name() string
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager of iptables firewall
func (*Manager) AddNatRule ¶ added in v0.30.0
func (m *Manager) AddNatRule(pair firewall.RouterPair) error
func (*Manager) AddPeerFiltering ¶ added in v0.30.0
func (m *Manager) AddPeerFiltering( ip net.IP, protocol firewall.Protocol, sPort *firewall.Port, dPort *firewall.Port, direction firewall.RuleDirection, action firewall.Action, ipsetName string, comment string, ) ([]firewall.Rule, error)
AddPeerFiltering adds a rule to the firewall
Comment will be ignored because some system this feature is not supported
func (*Manager) AddRouteFiltering ¶ added in v0.30.0
func (*Manager) AllowNetbird ¶ added in v0.23.0
AllowNetbird allows netbird interface traffic
func (*Manager) DeletePeerRule ¶ added in v0.30.0
DeletePeerRule from the firewall by rule definition
func (*Manager) DeleteRouteRule ¶ added in v0.30.0
func (*Manager) Init ¶ added in v0.30.3
func (m *Manager) Init(stateManager *statemanager.Manager) error
func (*Manager) IsServerRouteSupported ¶ added in v0.24.4
func (*Manager) RemoveNatRule ¶ added in v0.30.0
func (m *Manager) RemoveNatRule(pair firewall.RouterPair) error
func (*Manager) Reset ¶
func (m *Manager) Reset(stateManager *statemanager.Manager) error
Reset firewall to the default state
func (*Manager) SetLegacyManagement ¶ added in v0.30.0
type Rule ¶
type Rule struct {
// contains filtered or unexported fields
}
Rule to handle management of rules
type ShutdownState ¶ added in v0.30.3
type ShutdownState struct { sync.Mutex InterfaceState *InterfaceState `json:"interface_state,omitempty"` RouteRules routeRules `json:"route_rules,omitempty"` RouteIPsetCounter *ipsetCounter `json:"route_ipset_counter,omitempty"` ACLEntries aclEntries `json:"acl_entries,omitempty"` ACLIPsetStore *ipsetStore `json:"acl_ipset_store,omitempty"` }
func (*ShutdownState) Cleanup ¶ added in v0.30.3
func (s *ShutdownState) Cleanup() error
func (*ShutdownState) Name ¶ added in v0.30.3
func (s *ShutdownState) Name() string
Click to show internal directories.
Click to hide internal directories.