Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy interface { // Request decorates http.Client.Do() by adding the given proxy configuration to the request. Request(request http.Request, proxyURL url.URL, proxyUser string, proxyPassword string) (*http.Response, error) // RequestWithRandomProxy chooses a random proxy to make the given request through and returns both the response / // error combination and the chosen proxy. RequestWithRandomProxy(request http.Request) (proxyURL *url.URL, response *http.Response, err error) }
Proxy is used to perform a proxied request via gowebshareproxy.
func NewWithList ¶
NewWithList returns a new Proxy with an (optionally pre-configured) http client and a list of proxies, which you can download directly from the [webshare proxy list page](https://proxy.webshare.io/proxy/list). You can then call Proxy.RequestWithRandomProxy() to have a proxy randomly chosen from this list for the given request.
Click to show internal directories.
Click to hide internal directories.