Documentation
¶
Overview ¶
Package router presents an interface to manipulate the host network stack's state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { LocalAddrs []netaddr.IPPrefix Routes []netaddr.IPPrefix // routes to point into the Tailscale interface DNS dns.Config SubnetRoutes []netaddr.IPPrefix // subnets being advertised to other Tailscale nodes SNATSubnetRoutes bool // SNAT traffic to local subnets NetfilterMode preftype.NetfilterMode // how much to manage netfilter rules }
Config is the subset of Tailscale configuration that is relevant to the OS's network stack.
type Router ¶
type Router interface { // Up brings the router up. Up() error // Set updates the OS network stack with a new Config. It may be // called multiple times with identical Configs, which the // implementation should handle gracefully. Set(*Config) error // Close closes the router. Close() error }
Router is responsible for managing the system network stack.
There is typically only one instance of this interface per process.
Click to show internal directories.
Click to hide internal directories.