tun

package
v1.1.30 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoutes

func AddRoutes(routes ...types.Route) error

AddRoutes for outer called

func GetInterface

func GetInterface() (*net.Interface, error)

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