proxy

package module
v0.0.0-...-cbd1327 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownScheme = errors.New("unknown proxy URI scheme")
	ErrInvalidParams = errors.New("invalid parameters")
)

Functions

func ParseProxies

func ParseProxies(proxies *[]Proxy, proxyURI string, proxyListFiles []string) (err error)

func ParseProxyFile

func ParseProxyFile(proxies *[]Proxy, proxyFile string) (err error)

func ParseProxyURIString

func ParseProxyURIString(proxies *[]Proxy, proxyURI string) (err error)

func SOCKS4Dialer

func SOCKS4Dialer(u *url.URL, forward netproxy.Dialer) (dialer netproxy.Dialer, err error)

Types

type Proxy

type Proxy interface {
	URL() *url.URL
	Client() *http.Client
}
var Direct Proxy

func FromURL

func FromURL(u *url.URL, forward netproxy.Dialer) (proxy Proxy, err error)

func FromURLString

func FromURLString(u string, forward netproxy.Dialer) (proxy Proxy, err error)

func HTTP

func HTTP(u *url.URL, forward netproxy.Dialer) (proxy Proxy, err error)

func SOCKS4

func SOCKS4(u *url.URL, forward netproxy.Dialer) (proxy Proxy, err error)

func SOCKS5

func SOCKS5(u *url.URL, forward netproxy.Dialer) (proxy Proxy, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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