Documentation
¶
Overview ¶
Package net implements the netgofer sidecar network proxy.
Index ¶
Constants ¶
View Source
const ( // DefaultMTU is the MTU assumed for a network link when none is otherwise // known. It matches the conventional Ethernet MTU. DefaultMTU = 1500 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Netgofer ¶
type Netgofer struct {
util.InternalSubCommand
// contains filtered or unexported fields
}
Netgofer implements subcommands.Command for the "netgofer" command.
netgofer acts as a network proxy for gVisor sandboxes (runsc) to proxy network traffic over a unix domain socket (UDS) connection. It should not be called directly.
It runs a user-space netstack to proxy outbound TCP and UDP traffic and intercepts traffic from the sandbox and forwards it to the host network via host sockets (translating source IP to host/pod IP).
Limitations:
- Only outbound TCP and UDP traffic is supported. ICMP and inbound connections are not supported.
- Link-local destinations (169.254.0.0/16 and fe80::/10, including GCE metadata DNS 169.254.169.254 and NodeLocal DNSCache 169.254.20.10) are blocked by the egress filter.
- Network connection preservation across save/restore is not supported, existing connections will be reset upon restore.
func (*Netgofer) Execute ¶
func (n *Netgofer) Execute(_ context.Context, f *flag.FlagSet, args ...any) subcommands.ExitStatus
Execute implements subcommands.Command.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package egressfilter validates outbound traffic destinations for netgofer, enforcing invariants such as loopback, multicast, link-local, broadcast, and host network interface protection.
|
Package egressfilter validates outbound traffic destinations for netgofer, enforcing invariants such as loopback, multicast, link-local, broadcast, and host network interface protection. |
|
Package filter defines all syscalls the netgofer is allowed to make, and installs seccomp filters to prevent prohibited syscalls in case it's compromised.
|
Package filter defines all syscalls the netgofer is allowed to make, and installs seccomp filters to prevent prohibited syscalls in case it's compromised. |
|
config
Package config defines all syscalls the netgofer is allowed to make to the host.
|
Package config defines all syscalls the netgofer is allowed to make to the host. |
Click to show internal directories.
Click to hide internal directories.