tunnel

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultEndpointPort = 51820
	// DefaultKeepaliveInterval is sensible interval that works with a wide variety of firewalls.
	DefaultKeepaliveInterval = 25 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LocalAddress    netip.Addr
	LocalPrivateKey secret.Secret
	Endpoint        netip.AddrPort
	RemotePublicKey secret.Secret
	RemoteNetwork   netip.Prefix
	DNS             *netip.Addr
	MTU             int
	KeepAlive       time.Duration
}

type Tunnel

type Tunnel struct {
	// contains filtered or unexported fields
}

func Connect

func Connect(config *Config) (*Tunnel, error)

func (*Tunnel) Close

func (t *Tunnel) Close()

func (*Tunnel) DialContext

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

Jump to

Keyboard shortcuts

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