proxyutils

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	SOCKS5 = "socks5"
	HTTP   = "http"
	HTTPS  = "https"
)

Variables

View Source
var ProxyProbeConcurrency = 8

Functions

func GetAnyAliveProxy

func GetAnyAliveProxy(timeoutInSec int, proxies ...string) (string, error)

GetAnyAliveProxy returns a proxy from the list of proxies that is alive

func GetAnyAliveProxyFunc

func GetAnyAliveProxyFunc(timeoutInSec int, proxyURLs ...string) (func(*http.Request) (*url.URL, error), error)

GetAnyAliveProxyFunc returns a proxy func from the given proxy url

func GetProxyFunc

func GetProxyFunc(proxyURL string) (func(*http.Request) (*url.URL, error), error)

GetProxyFunc returns a proxy func from the given proxy url

func GetProxyURL

func GetProxyURL(proxyAddr string) (url.URL, error)

GetProxyURL returns a Proxy URL after validating if given proxy url is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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