tun

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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
	MTU     int
	Routes  []IPRoute
	Gateway string
}

Config is the config for TUN device.

type IPRoute

type IPRoute struct {
	Dest    *net.IPNet
	Gateway net.IP
}

IPRoute is an IP routing entry.

Jump to

Keyboard shortcuts

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