Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OutlineTunnel ¶
OutlineTunnel embeds the tun2socks.Tunnel interface so it gets exported by gobind.
func ConnectShadowsocksTunnel ¶
func ConnectShadowsocksTunnel(tunWriter TunWriter, host string, port int, password, cipher string, isUDPEnabled bool, tk string, tcp_website string, udp_dns string) (OutlineTunnel, error)
ConnectShadowsocksTunnel reads packets from a TUN device and routes it to a Shadowsocks proxy server. Returns an OutlineTunnel instance that should be used to input packets to the tunnel.
`tunWriter` is used to output packets to the TUN (VPN). `host` is IP address of the Shadowsocks proxy server. `port` is the port of the Shadowsocks proxy server. `password` is the password of the Shadowsocks proxy. `cipher` is the encryption cipher the Shadowsocks proxy. `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).