dialer

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROXY_CONNECT_METHOD       = "CONNECT"
	PROXY_HOST_HEADER          = "Host"
	PROXY_AUTHORIZATION_HEADER = "Proxy-Authorization"
	MISSING_CHAIN_CERT         = `` /* 1387-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func BasicAuthHeader

func BasicAuthHeader(login, password string) string

func WrapStringToCb

func WrapStringToCb(s string) func() (string, error)

Types

type ContextDialer

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

type Dialer

type Dialer interface {
	Dial(network, address string) (net.Conn, error)
}

type FixedDialer

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

func NewFixedDialer

func NewFixedDialer(address string, next ContextDialer) *FixedDialer

func (*FixedDialer) Dial

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

func (*FixedDialer) DialContext

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

type LookupNetIPer

type LookupNetIPer interface {
	LookupNetIP(context.Context, string, string) ([]netip.Addr, error)
}

type ProxyDialer

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

func NewProxyDialer

func NewProxyDialer(address, tlsServerName, fakeSNI, auth stringCb, intermediateWorkaround bool, caPool *x509.CertPool, nextDialer ContextDialer) *ProxyDialer

func ProxyDialerFromURL

func ProxyDialerFromURL(u *url.URL, next ContextDialer) (*ProxyDialer, error)

func (*ProxyDialer) Dial

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

func (*ProxyDialer) DialContext

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

type Resolver

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

func NewResolver

func NewResolver(addresses []string, timeout time.Duration) (*Resolver, error)

func (*Resolver) Close

func (r *Resolver) Close() error

func (*Resolver) LookupNetIP

func (r *Resolver) LookupNetIP(ctx context.Context, network string, host string) (addrs []netip.Addr, err error)

type ResolvingDialer

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

func NewResolvingDialer

func NewResolvingDialer(lookup LookupNetIPer, next ContextDialer) *ResolvingDialer

func (*ResolvingDialer) Dial

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

func (*ResolvingDialer) DialContext

func (d *ResolvingDialer) 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
JackTT - Gopher 🇻🇳