proxy

package
v11.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProxyURL

func GetProxyURL(dialAddr string) *url.URL

GetProxyURL gets the HTTP proxy address to use for a given address, if any.

Types

type HTTPFallbackRoundTripper

type HTTPFallbackRoundTripper struct {
	*http.Transport
	// contains filtered or unexported fields
}

HTTPFallbackRoundTripper is a wrapper for http.Transport that downgrades requests to plain HTTP when using a plain HTTP proxy at localhost.

func NewHTTPFallbackRoundTripper

func NewHTTPFallbackRoundTripper(transport *http.Transport, insecure bool) *HTTPFallbackRoundTripper

NewHTTPFallbackRoundTripper creates a new initialized HTTP fallback roundtripper.

func (*HTTPFallbackRoundTripper) RoundTrip

func (rt *HTTPFallbackRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip executes a single HTTP transaction. Part of the RoundTripper interface.

Jump to

Keyboard shortcuts

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