tun

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: GPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrivateVlan4Client = "172.19.0.1"
	PrivateVlan6Client = "fdfe:dcba:9876::1"
)
View Source
const DefaultTunName = "tun0"

Variables

View Source
var BypassPrivateRoute []string

Functions

func AddRoute

func AddRoute(name string, bypassLan bool) (cmd string, err error)

Types

type Tun2socks

type Tun2socks struct {
	// contains filtered or unexported fields
}

func NewTun2socks

func NewTun2socks(name string, addr string, socksPort int, dnsPort int, mtu int, debug bool) (*Tun2socks, error)

func (*Tun2socks) Close

func (t *Tun2socks) Close()

func (*Tun2socks) DialContext

func (t *Tun2socks) DialContext(ctx context.Context, metadata *constant.Metadata) (net.Conn, error)

func (*Tun2socks) DialUDP

func (t *Tun2socks) DialUDP(metadata *constant.Metadata) (net.PacketConn, error)

func (*Tun2socks) Start

func (t *Tun2socks) Start()

Jump to

Keyboard shortcuts

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