Help us shape the future of Go! Take the 2026 Go Developer Survey

netns

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package netns keeps the agent's own traffic (control plane, relay and WireGuard's UDP socket) out of the tunnel. On Linux its sockets carry Mark, which the policy routing rules installed for subnet routes and exit nodes send through the main routing table. Elsewhere it is a no-op.

Index

Constants

View Source
const Mark = 0x80000

Mark is the firewall mark set on the agent's own sockets.

View Source
const MarkMask = 0xff0000

MarkMask selects the bits of Mark in routing rules.

Variables

This section is empty.

Functions

func DialContext

func DialContext(ctx context.Context, network, address string) (net.Conn, error)

DialContext dials with Dialer.

func Dialer

func Dialer() *net.Dialer

Dialer returns a dialer whose connections bypass the tunnel.

func ListenConfig

func ListenConfig() *net.ListenConfig

ListenConfig returns a listen config whose sockets bypass the tunnel.

func Resolver

func Resolver() *net.Resolver

Resolver looks names up without going through the tunnel.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL