Esempio n. 1
0
// 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
}
Esempio n. 2
0
// 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
}
Esempio n. 3
0
// Client starts a new go-tunnel session on conn
func Client(conn net.Conn) *client.Session {
	return client.NewSession(muxado.Client(conn))
}