dialer

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoSuitableAddress  = errors.New("no suitable address")
	ErrBadIPAddressLength = errors.New("bad IP address length")
	ErrUnknownNetwork     = errors.New("unknown network")
)

Functions

func HTTPProxyDialerFromURL

func HTTPProxyDialerFromURL(u *url.URL, next xproxy.Dialer) (xproxy.Dialer, error)

Types

type BoundDialer

type BoundDialer struct {
	// contains filtered or unexported fields
}

func NewBoundDialer

func NewBoundDialer(defaultDialer BoundDialerDefaultSink, defaultHints string) *BoundDialer

func (*BoundDialer) Dial

func (d *BoundDialer) Dial(network, address string) (net.Conn, error)

func (*BoundDialer) DialContext

func (d *BoundDialer) DialContext(ctx context.Context, network, address string) (net.Conn, error)

type BoundDialerContextKey

type BoundDialerContextKey struct{}

type BoundDialerContextValue

type BoundDialerContextValue struct {
	Hints     *string
	LocalAddr string
}

type BoundDialerDefaultSink

type BoundDialerDefaultSink interface {
	DialContext(ctx context.Context, network, address string) (net.Conn, error)
}

type ContextDialer

type ContextDialer = xproxy.ContextDialer

func MaybeWrapWithContextDialer

func MaybeWrapWithContextDialer(d Dialer) ContextDialer

type Dialer

type Dialer = xproxy.Dialer

func ProxyDialerFromURL

func ProxyDialerFromURL(proxyURL string, forward Dialer) (Dialer, error)

type HTTPProxyDialer

type HTTPProxyDialer struct {
	// contains filtered or unexported fields
}

func NewHTTPProxyDialer

func NewHTTPProxyDialer(address string, tls bool, userinfo *url.Userinfo, next Dialer) *HTTPProxyDialer

func (*HTTPProxyDialer) Dial

func (d *HTTPProxyDialer) Dial(network, address string) (net.Conn, error)

func (*HTTPProxyDialer) DialContext

func (d *HTTPProxyDialer) DialContext(ctx context.Context, network, address string) (net.Conn, error)

Jump to

Keyboard shortcuts

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