Documentation
¶
Overview ¶
Package iptables implements helpers for manipulating the iptables. Requires the iptables command to be installed. Requires 'NET_ADMIN' capabilities for manipulating the iptables.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TrafficRedirectionSpec ¶
type TrafficRedirectionSpec struct { // Interface on which the traffic will be intercepted Iface string // Destination port of the traffic to be redirected DestinationPort uint // Port the traffic will be redirected to RedirectPort uint }
TrafficRedirectionSpec specifies the redirection of traffic to a destination
type TrafficRedirector ¶
type TrafficRedirector interface { // Start initiates the redirection of traffic and resets existing connections Start() error // Stop restores the traffic to the original target and resets existing connections // to the redirection target Stop() error }
TrafficRedirector defines the interface for a traffic redirector
func NewTrafficRedirector ¶
func NewTrafficRedirector(tf *TrafficRedirectionSpec) (TrafficRedirector, error)
NewTrafficRedirector creates an instance of a TrafficRedirector with default configuration
type TrafficRedirectorConfig ¶
TrafficRedirectorConfig defines the options for creating a TrafficRedirector
Click to show internal directories.
Click to hide internal directories.