gost/pkg/components/dialer/dialer.go

20 lines
361 B
Go

package dialer
import (
"context"
"net"
)
// Transporter is responsible for dialing to the proxy server.
type Dialer interface {
Dial(ctx context.Context, addr string, opts ...DialOption) (net.Conn, error)
}
type Handshaker interface {
Handshake(ctx context.Context, conn net.Conn) (net.Conn, error)
}
type Multiplexer interface {
IsMultiplex() bool
}