tun

package
v2.3.13 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClosedErr = errors.New("accept on closed listener")

Functions

func AddRoutes

func AddRoutes(tunName string, routes ...types.Route) error

AddRoutes for outer called

func Listener

func Listener(config Config) (net.Listener, error)

Listener TunListener creates a listener for tun tunnel.

Types

type Config

type Config struct {
	Name    string
	Addr    string
	Addr6   string
	MTU     int
	Routes  []types.Route
	Gateway string
}

Config is the config for TUN device.

Jump to

Keyboard shortcuts

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