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 tunnels over an already-opened tun device. It runs a UDP link and a TCP link to the server, each of which keeps itself connected (re-dialing on failure), and adapts between them at runtime. It fails only if the server address is malformed.
Click to show internal directories.
Click to hide internal directories.