dialer

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 7 Imported by: 1 module, 29 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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