tun

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: MIT Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoutes added in v1.1.15

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

AddRoutes for outer called

func GetInterface added in v1.1.18

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