tun

package
v2.2.8 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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