tun

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RouteManager added in v1.1.1

type RouteManager struct{}

RouteManager is the stub mirror of the Windows-side type.

func NewRouteManager added in v1.1.1

func NewRouteManager(_ *log.Logger) *RouteManager

NewRouteManager returns a no-op stub on non-Windows platforms.

func (*RouteManager) ExcludeIPs added in v1.1.1

func (r *RouteManager) ExcludeIPs(_ []net.IP) error

ExcludeIPs is a no-op on non-Windows. Returns nil.

func (*RouteManager) Restore added in v1.1.1

func (r *RouteManager) Restore()

Restore is a no-op on non-Windows.

func (*RouteManager) SaveOriginalState added in v1.1.1

func (r *RouteManager) SaveOriginalState() error

SaveOriginalState is a no-op on non-Windows. Returns nil.

func (*RouteManager) SetDefaultRoute added in v1.1.1

func (r *RouteManager) SetDefaultRoute(_ net.IP, _ int) error

SetDefaultRoute is a no-op on non-Windows. Returns nil. Kept here so cross-platform tests can call it safely even though only the Windows-side autoWG uses it for real.

type Stack

type Stack struct {
	ActiveConns atomic.Int64
	TotalConns  atomic.Int64
	// contains filtered or unexported fields
}

func NewStack

func NewStack(ctx context.Context, sm *tunnel.StreamManager, tunIP net.IP, mtu int, lg *log.Logger) (*Stack, error)

func (*Stack) Close

func (st *Stack) Close()

func (*Stack) Endpoint

func (st *Stack) Endpoint() *channel.Endpoint

func (*Stack) InjectPacket

func (st *Stack) InjectPacket(pkt []byte)

func (*Stack) ReadPacket

func (st *Stack) ReadPacket() ([]byte, bool)

Jump to

Keyboard shortcuts

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