proxyclient

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetURLScheme

func GetURLScheme(rawURL string) (string, error)

GetURLScheme returns the scheme of a URL

Types

type AuthMethod

type AuthMethod struct {
	Type   string            `yaml:"type"`
	Params map[string]string `yaml:"params"`
}

AuthMethod represent a method to authenticate with a proxy

type PreparedRequest

type PreparedRequest struct {
	Client   *http.Client
	Request  *http.Request
	ProxyURL *url.URL
}

PreparedRequest contains everything needed to make a request through a proxy

func MakeClientAndRequest

func MakeClientAndRequest(rc RequestConfig) (*PreparedRequest, error)

MakeClientAndRequest prepares a client and a request

type RequestConfig added in v0.3.0

type RequestConfig struct {
	Target     string
	Proxy      string
	Auth       *AuthMethod
	SourceAddr string
	Insecure   bool
	Timeout    time.Duration
}

RequestConfig is used to build a request

Jump to

Keyboard shortcuts

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