fasthttpproxy

package
v1.52.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: MIT Imports: 11 Imported by: 138

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FasthttpHTTPDialer added in v1.12.0

func FasthttpHTTPDialer(proxy string) fasthttp.DialFunc

FasthttpHTTPDialer returns a fasthttp.DialFunc that dials using the provided HTTP proxy.

Example usage:

c := &fasthttp.Client{
	Dial: fasthttpproxy.FasthttpHTTPDialer("username:password@localhost:9050"),
}

func FasthttpHTTPDialerTimeout added in v1.17.0

func FasthttpHTTPDialerTimeout(proxy string, timeout time.Duration) fasthttp.DialFunc

FasthttpHTTPDialerTimeout returns a fasthttp.DialFunc that dials using the provided HTTP proxy using the given timeout.

Example usage:

c := &fasthttp.Client{
	Dial: fasthttpproxy.FasthttpHTTPDialerTimeout("username:password@localhost:9050", time.Second * 2),
}

func FasthttpProxyHTTPDialer added in v1.17.0

func FasthttpProxyHTTPDialer() fasthttp.DialFunc

FasthttpProxyHTTPDialer returns a fasthttp.DialFunc that dials using the env(HTTP_PROXY, HTTPS_PROXY and NO_PROXY) configured HTTP proxy.

Example usage:

c := &fasthttp.Client{
	Dial: fasthttpproxy.FasthttpProxyHTTPDialer(),
}

func FasthttpProxyHTTPDialerTimeout added in v1.17.0

func FasthttpProxyHTTPDialerTimeout(timeout time.Duration) fasthttp.DialFunc

FasthttpProxyHTTPDialerTimeout returns a fasthttp.DialFunc that dials using the env(HTTP_PROXY, HTTPS_PROXY and NO_PROXY) configured HTTP proxy using the given timeout.

Example usage:

c := &fasthttp.Client{
	Dial: fasthttpproxy.FasthttpProxyHTTPDialerTimeout(time.Second * 2),
}

func FasthttpSocksDialer

func FasthttpSocksDialer(proxyAddr string) fasthttp.DialFunc

FasthttpSocksDialer returns a fasthttp.DialFunc that dials using the provided SOCKS5 proxy.

Example usage:

c := &fasthttp.Client{
	Dial: fasthttpproxy.FasthttpSocksDialer("socks5://localhost:9050"),
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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