Documentation ¶
Overview ¶
Package netstack wires up gVisor's netstack into Tailscale.
Index ¶
- func NewSubnetRouterWrapper(r router.Router) router.Router
- type Impl
- func (ns *Impl) Close() error
- func (ns *Impl) DialContextTCP(ctx context.Context, ipp netip.AddrPort) (*gonet.TCPConn, error)
- func (ns *Impl) DialContextUDP(ctx context.Context, ipp netip.AddrPort) (*gonet.UDPConn, error)
- func (ns *Impl) SetLocalBackend(lb *ipnlocal.LocalBackend)
- func (ns *Impl) Start() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Impl ¶
type Impl struct { // ForwardTCPIn, if non-nil, handles forwarding an inbound TCP // connection. // TODO(bradfitz): provide mechanism for tsnet to reject a // port other than accepting it and closing it. ForwardTCPIn func(c net.Conn, port uint16) // ProcessLocalIPs is whether netstack should handle incoming // traffic directed at the Node.Addresses (local IPs). // It can only be set before calling Start. ProcessLocalIPs bool // ProcessSubnets is whether netstack should handle incoming // traffic destined to non-local IPs (i.e. whether it should // be a subnet router). // It can only be set before calling Start. ProcessSubnets bool // contains filtered or unexported fields }
Impl contains the state for the netstack implementation, and implements wgengine.FakeImpl to act as a userspace network stack when Tailscale is running in fake mode.
func Create ¶
func Create(logf logger.Logf, tundev *tstun.Wrapper, e wgengine.Engine, mc *magicsock.Conn, dialer *tsdial.Dialer, dns *dns.Manager) (*Impl, error)
Create creates and populates a new Impl.
func (*Impl) DialContextTCP ¶
func (*Impl) DialContextUDP ¶
func (*Impl) SetLocalBackend ¶
func (ns *Impl) SetLocalBackend(lb *ipnlocal.LocalBackend)
SetLocalBackend sets the LocalBackend; it should only be run before the Start method is called.
Click to show internal directories.
Click to hide internal directories.