Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
LocalIPAddrs = net.InterfaceAddrs
)
mock net.InterfaceAddrs to make its unit test become available
Functions ¶
func ValidateOwnerGroups ¶
Types ¶
type Config ¶
type Config struct { ProxyPort string `json:"PROXY_PORT"` InboundCapturePort string `json:"INBOUND_CAPTURE_PORT"` InboundTunnelPort string `json:"INBOUND_TUNNEL_PORT"` ProxyUID string `json:"PROXY_UID"` ProxyGID string `json:"PROXY_GID"` InboundInterceptionMode string `json:"INBOUND_INTERCEPTION_MODE"` InboundTProxyMark string `json:"INBOUND_TPROXY_MARK"` InboundTProxyRouteTable string `json:"INBOUND_TPROXY_ROUTE_TABLE"` InboundPortsInclude string `json:"INBOUND_PORTS_INCLUDE"` InboundPortsExclude string `json:"INBOUND_PORTS_EXCLUDE"` OwnerGroupsInclude string `json:"OUTBOUND_OWNER_GROUPS_INCLUDE"` OwnerGroupsExclude string `json:"OUTBOUND_OWNER_GROUPS_EXCLUDE"` OutboundPortsInclude string `json:"OUTBOUND_PORTS_INCLUDE"` OutboundPortsExclude string `json:"OUTBOUND_PORTS_EXCLUDE"` OutboundIPRangesInclude string `json:"OUTBOUND_IPRANGES_INCLUDE"` OutboundIPRangesExclude string `json:"OUTBOUND_IPRANGES_EXCLUDE"` RerouteVirtualInterfaces string `json:"KUBE_VIRT_INTERFACES"` ExcludeInterfaces string `json:"EXCLUDE_INTERFACES"` IptablesProbePort uint16 `json:"IPTABLES_PROBE_PORT"` ProbeTimeout time.Duration `json:"PROBE_TIMEOUT"` DryRun bool `json:"DRY_RUN"` SkipRuleApply bool `json:"SKIP_RULE_APPLY"` RunValidation bool `json:"RUN_VALIDATION"` RedirectDNS bool `json:"REDIRECT_DNS"` DropInvalid bool `json:"DROP_INVALID"` CaptureAllDNS bool `json:"CAPTURE_ALL_DNS"` EnableIPv6 bool `json:"ENABLE_INBOUND_IPV6"` DNSServersV4 []string `json:"DNS_SERVERS_V4"` DNSServersV6 []string `json:"DNS_SERVERS_V6"` NetworkNamespace string `json:"NETWORK_NAMESPACE"` // When running in host filesystem, we have different semantics around the environment. // For instance, we would have a node-shared IPTables lock, despite not needing it. // HostFilesystemPodNetwork indicates we are in this mode, typically from the CNI. HostFilesystemPodNetwork bool `json:"CNI_MODE"` TraceLogging bool `json:"IPTABLES_TRACE_LOGGING"` DualStack bool `json:"DUAL_STACK"` HostIP netip.Addr `json:"HOST_IP"` HostIPv4LoopbackCidr string `json:"HOST_IPV4_LOOPBACK_CIDR"` Reconcile bool `json:"RECONCILE"` CleanupOnly bool `json:"CLEANUP_ONLY"` ForceApply bool `json:"FORCE_APPLY"` }
Command line options nolint: maligned
func DefaultConfig ¶
func DefaultConfig() *Config
func (*Config) FillConfigFromEnvironment ¶
type InterceptFilter ¶
func InterceptAllExcept ¶
func InterceptAllExcept(values ...string) InterceptFilter
func InterceptOnly ¶
func InterceptOnly(values ...string) InterceptFilter
func ParseInterceptFilter ¶
func ParseInterceptFilter(include, exclude string) InterceptFilter
Click to show internal directories.
Click to hide internal directories.