// Dial starts a go-tunnel session on a new connection to addr func Dial(network, addr string) (*client.Session, error) { mux, err := muxado.Dial(network, addr) if err != nil { return nil, err } return client.NewSession(mux), nil }
// DialExtra starts a go-tunnel session on a new tls connection to addr func DialTLS(network, addr string, tlsConfig *tls.Config) (*client.Session, error) { mux, err := muxado.DialTLS(network, addr, tlsConfig) if err != nil { return nil, err } return client.NewSession(mux), nil }
// Client starts a new go-tunnel session on conn func Client(conn net.Conn) *client.Session { return client.NewSession(muxado.Client(conn)) }