Integrations / Language

Use Proxys with Go

Use Proxys with Go's net/http.

Steps

  1. Parse the proxy URL and set it on the transport.
Go
proxy, _ := url.Parse("http://USERNAME-country-us:PASSWORD@gw.proxys.co:8000")
client := &http.Client{Transport: &http.Transport{Proxy: http.ProxyURL(proxy)}, Timeout: 30 * time.Second}
resp, err := client.Get("https://ipinfo.io/json")

Before you start

Replace USERNAME and PASSWORD with a sub-user's credentials from the dashboard. Change -country-us to the country you need, or remove it for a random location. See targeting options for city, ASN and sticky sessions.

Try 1 GB for $1