Documentation
¶
Overview ¶
Package client implements the shadowgate client. It opens one or more links to the server — a TCP link and a UDP link — probes each with keepalives, and sends tunnel traffic over the healthy link with the lowest latency, switching automatically as conditions change (or falling back when one path fails).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(device tun.TUN, ip net.IP, network *net.IPNet, connect string, password []byte, useCompression bool, maxPadding int, timeout time.Duration) (*Client, error)
NewClient opens the available transports to connect and tunnels over an already-opened tun device. It tries both UDP and TCP; whichever connects becomes a link, and the client adapts between them at runtime. It fails only if no transport can be established.
Click to show internal directories.
Click to hide internal directories.