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`.
Click to show internal directories.
Click to hide internal directories.