outline

package
v0.0.0-...-4cf4c4f Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tunnel

type Tunnel interface {
	tunnel.Tunnel

	// UpdateUDPSupport determines if UDP is supported following a network connectivity change.
	// Sets the tunnel's UDP connection handler accordingly, falling back to DNS over TCP if UDP is not supported.
	// Returns whether UDP proxying is supported in the new network.
	UpdateUDPSupport() bool
}

Tunnel represents a tunnel from a TUN device to a server.

func NewTunnel

func NewTunnel(host string, port int, password, cipher string, isUDPEnabled bool, tunWriter io.WriteCloser, tk string, tcp_website string, udp_dns string) (Tunnel, error)

NewTunnel connects a tunnel to a Shadowsocks proxy server and returns an `outline.Tunnel`.

`host` is the IP or domain of the Shadowsocks proxy. `port` is the port of the Shadowsocks proxy. `password` is the password of the Shadowsocks proxy. `cipher` is the encryption cipher used by the Shadowsocks proxy. `isUDPEnabled` indicates if the Shadowsocks proxy and the network support proxying UDP traffic. `tunWriter` is used to output packets back to the TUN device. OutlineTunnel.Disconnect() will close `tunWriter`.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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