Documentation ¶
Overview ¶
Package iptables handles forwarding ports found in iptables DNAT
Package iptables handles forwarding ports found in iptables DNAT
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iptables ¶
type Iptables struct {
// contains filtered or unexported fields
}
Iptables manages port forwarding for ports identified in iptables DNAT rules. It is primarily responsible for handling port mappings in Kubernetes environments that are not exposed via the Kubernetes API. The package scans iptables for these port and uses the k8sServiceListenerAddr setting for the hostIP property to create a port mapping and forwards them to both the API tracker and the WSL Proxy for proper routing and handling.
func (*Iptables) ForwardPorts ¶
ForwardPorts forwards ports found in iptables DNAT. In some environments, like WSL, ports defined using the CNI portmap plugin happen through iptables. These ports are not sent to places like /proc/net/tcp and are not picked up as part of the normal forwarding system. This function detects those ports and binds them to k8sServiceListenerAddr so that they are picked up.
type IptablesScanner ¶
type IptablesScanner struct{}
func NewIptablesScanner ¶
func NewIptablesScanner() *IptablesScanner