tun2socks

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppleTunnel

type AppleTunnel interface {
	tunnel.OutlineTunnel
}

AppleTunnel embeds the tun2socks.Tunnel interface so it gets exported by gobind.

func ConnectSocksTunnel

func ConnectSocksTunnel(tunWriter TunWriter, host string, port int, isUDPEnabled bool) (AppleTunnel, error)

ConnectSocksTunnel reads packets from a TUN device and routes it to a SOCKS server. Returns an AppleTunnel instance that should be used to input packets to the tunnel.

`tunWriter` is used to output packets to the TUN (VPN). `host` is the IP address of the SOCKS proxy server. `port` is the port of the SOCKS proxy server. `isUDPEnabled` indicates whether the tunnel and/or network enable UDP proxying.

Sets an error if the tunnel fails to connect.

type TunWriter

type TunWriter interface {
	io.WriteCloser
}

TunWriter is an interface that allows for outputting packets to the TUN (VPN).

Jump to

Keyboard shortcuts

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