Documentation ¶
Index ¶
- func FasthttpHTTPDialer(proxy string) rawfasthttp.DialFunc
- func FasthttpHTTPDialerTimeout(proxy string, timeout time.Duration) rawfasthttp.DialFunc
- func FasthttpProxyHTTPDialer() rawfasthttp.DialFunc
- func FasthttpProxyHTTPDialerTimeout(timeout time.Duration) rawfasthttp.DialFunc
- func FasthttpSocksDialer(proxyAddr string) rawfasthttp.DialFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FasthttpHTTPDialer ¶
func FasthttpHTTPDialer(proxy string) rawfasthttp.DialFunc
FasthttpHTTPDialer returns a rawfasthttp.DialFunc that dials using the provided HTTP proxy.
Example usage:
c := &rawfasthttp.Client{ Dial: fasthttpproxy.FasthttpHTTPDialer("username:password@localhost:9050"), }
func FasthttpHTTPDialerTimeout ¶
func FasthttpHTTPDialerTimeout(proxy string, timeout time.Duration) rawfasthttp.DialFunc
FasthttpHTTPDialerTimeout returns a rawfasthttp.DialFunc that dials using the provided HTTP proxy using the given timeout.
Example usage:
c := &rawfasthttp.Client{ Dial: fasthttpproxy.FasthttpHTTPDialerTimeout("username:password@localhost:9050", time.Second * 2), }
func FasthttpProxyHTTPDialer ¶
func FasthttpProxyHTTPDialer() rawfasthttp.DialFunc
FasthttpProxyHTTPDialer returns a rawfasthttp.DialFunc that dials using the the env(HTTP_PROXY, HTTPS_PROXY and NO_PROXY) configured HTTP proxy.
Example usage:
c := &rawfasthttp.Client{ Dial: FasthttpProxyHTTPDialer(), }
func FasthttpProxyHTTPDialerTimeout ¶
func FasthttpProxyHTTPDialerTimeout(timeout time.Duration) rawfasthttp.DialFunc
FasthttpProxyHTTPDialer returns a rawfasthttp.DialFunc that dials using the env(HTTP_PROXY, HTTPS_PROXY and NO_PROXY) configured HTTP proxy using the given timeout.
Example usage:
c := &rawfasthttp.Client{ Dial: FasthttpProxyHTTPDialerTimeout(time.Second * 2), }
func FasthttpSocksDialer ¶
func FasthttpSocksDialer(proxyAddr string) rawfasthttp.DialFunc
FasthttpSocksDialer returns a rawfasthttp.DialFunc that dials using the provided SOCKS5 proxy.
Example usage:
c := &rawfasthttp.Client{ Dial: fasthttpproxy.FasthttpSocksDialer("socks5://localhost:9050"), }
Types ¶
This section is empty.