base

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
}

Config dialer config.

type Dialer

type Dialer struct {
	URL             *url.URL
	Forward         proxy.Dialer
	TLSClientConfig *tls.Config

	// Header sets the headers in the initial HTTP CONNECT request.  See
	// the documentation for http.Request for more information.
	Header http.Header

	// DialTimeout is an optional timeout for connections through (not to)
	// the proxy server.
	DialTimeout time.Duration

	HaveAuth bool
	Username string
	Password string
}

Dialer implement basic dialer for http protocol.

func (*Dialer) FillHeaderToReq

func (d *Dialer) FillHeaderToReq(req *http.Request, authHeadKey string)

func (*Dialer) NewHTTPRequest

func (d *Dialer) NewHTTPRequest(httpMethod, authHeadKey string) (*http.Request, error)

NewHTTPRequest return a *http.Request compose from remote address and other args.

func (*Dialer) NewRawConn

func (d *Dialer) NewRawConn(network string) (net.Conn, error)

NewRawConn create a raw connection with http(s) proxy.

type SchemeDialerGenerator

type SchemeDialerGenerator func(*url.URL, proxy.Dialer) (proxy.Dialer, error)

SchemeDialerGenerator is Dialer generator for `proxy.RegisterDialerType`.

Jump to

Keyboard shortcuts

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