tun

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Offset = 4

Variables

This section is empty.

Functions

func OpenTunDevice

func OpenTunDevice(local, gw *net.IPNet, name string, mtu int) (*tun.NativeTun, error)

Types

type Tunnel

type Tunnel struct {
	*tun.NativeTun
}

A wrapper for a proper Reader and Writer

func (*Tunnel) Close

func (t *Tunnel) Close() error

func (*Tunnel) Read

func (t *Tunnel) Read(b []byte) (int, error)

func (*Tunnel) Write

func (t *Tunnel) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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