proxy

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialServerViaCONNECT

func DialServerViaCONNECT(ctx context.Context, addr string, proxy *url.URL) (net.Conn, error)

func FromEnvironment

func FromEnvironment() *httpproxy.Config

func ProxyFromEnvironment

func ProxyFromEnvironment(req *http.Request) (*url.URL, error)

Types

type ProxyConfig

type ProxyConfig struct {
	ProxyURL *url.URL
	NoProxy  []string
}

func ProxyFromEnv

func ProxyFromEnv() *ProxyConfig

func (*ProxyConfig) DialContext

func (pc *ProxyConfig) DialContext(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