Documentation
¶
Overview ¶
Package firewall contains the OS specific implementation of the FirewallManager interface.
Index ¶
Constants ¶
View Source
const (
IPV4ForwardingFile = "/proc/sys/net/ipv4/ip_forward"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FirewallManager ¶
type FirewallManager interface {
IsForwardingEnabled() bool
EnableForwarding(enabled bool) error
EnableRedirection(r *Redirection, enabled bool) error
Restore()
}
func Make ¶
func Make(iface *network.Endpoint) FirewallManager
type LinuxFirewall ¶
type LinuxFirewall struct {
// contains filtered or unexported fields
}
func (LinuxFirewall) EnableForwarding ¶
func (f LinuxFirewall) EnableForwarding(enabled bool) error
func (*LinuxFirewall) EnableRedirection ¶
func (f *LinuxFirewall) EnableRedirection(r *Redirection, enabled bool) error
func (LinuxFirewall) IsForwardingEnabled ¶
func (f LinuxFirewall) IsForwardingEnabled() bool
func (LinuxFirewall) Restore ¶
func (f LinuxFirewall) Restore()
type Redirection ¶
type Redirection struct {
Interface string
Protocol string
SrcAddress string
SrcPort int
DstAddress string
DstPort int
}
func NewRedirection ¶
func (Redirection) String ¶
func (r Redirection) String() string
Click to show internal directories.
Click to hide internal directories.