network

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPProxyDialer

func HTTPProxyDialer(proxyAddr string) func(ctx context.Context, network, addr string) (net.Conn, error)

func SocksDialer

func SocksDialer(proxyAddr string) func(ctx context.Context, network, addr string) (net.Conn, error)

Types

type Resolver added in v1.5.0

type Resolver struct {
	DNSServers []string
}

func NewResolver added in v1.5.0

func NewResolver() *Resolver

func (*Resolver) DefaultTransport added in v1.5.0

func (r *Resolver) DefaultTransport(dialContext func(ctx context.Context, network, addr string) (net.Conn, error)) *http.Transport

func (*Resolver) DialerWithCustomDNSResolver added in v1.5.0

func (r *Resolver) DialerWithCustomDNSResolver(dnsServers []string) func(ctx context.Context, network, addr string) (net.Conn, error)

func (*Resolver) DialerWithRandomDNSResolver added in v1.6.0

func (r *Resolver) DialerWithRandomDNSResolver() func(ctx context.Context, network, addr string) (net.Conn, error)

Jump to

Keyboard shortcuts

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