dialer

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 7 Imported by: 154

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DialOption

type DialOption func(opts *DialOptions)

func HostDialOption

func HostDialOption(host string) DialOption

func NetDialerDialOption

func NetDialerDialOption(dialer xnet.Dialer) DialOption

type DialOptions

type DialOptions struct {
	Host   string
	Dialer xnet.Dialer
}

type Dialer

type Dialer interface {
	Init(metadata.Metadata) error
	Dial(ctx context.Context, addr string, opts ...DialOption) (net.Conn, error)
}

Transporter is responsible for dialing to the proxy server.

type HandshakeOption

type HandshakeOption func(opts *HandshakeOptions)

func AddrHandshakeOption

func AddrHandshakeOption(addr string) HandshakeOption

type HandshakeOptions

type HandshakeOptions struct {
	Addr string
}

type Handshaker

type Handshaker interface {
	Handshake(ctx context.Context, conn net.Conn, opts ...HandshakeOption) (net.Conn, error)
}

type Multiplexer

type Multiplexer interface {
	Multiplex() bool
}

type Option

type Option func(opts *Options)

func AuthOption

func AuthOption(auth *url.Userinfo) Option

func LoggerOption

func LoggerOption(logger logger.Logger) Option

func ProxyProtocolOption

func ProxyProtocolOption(ppv int) Option

func TLSConfigOption

func TLSConfigOption(tlsConfig *tls.Config) Option

type Options

type Options struct {
	Auth          *url.Userinfo
	TLSConfig     *tls.Config
	Logger        logger.Logger
	ProxyProtocol int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL