GO
Languages & HTTP Clients
Go (net/http) proxy integration
Go's standard library handles proxies through a custom Transport. Parse your Aethyn endpoint into a *url.URL, set it as the Transport's Proxy, and the http.Client routes every request through a residential IP.
Setup steps
- 1Parse your Aethyn proxy URL with url.Parse.
- 2Create an http.Transport with Proxy: http.ProxyURL(...).
- 3Attach the transport to an http.Client.
- 4Use the client as normal — targeting lives in the username.
Code
net/http with a proxy transport
package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
proxyURL, _ := url.Parse("http://aethyn-XXXXX-country-us:PASSWORD@proxy.aethyn.io:2099")
client := &http.Client{
Transport: &http.Transport{Proxy: http.ProxyURL(proxyURL)},
}
resp, err := client.Get("https://httpbin.org/ip")
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}Replace aethyn-XXXXX and PASSWORD with your dashboard credentials. See the full targeting reference and protocol/port list.
Tips
- Set Timeout on the http.Client to avoid hanging on slow exits.
- Reuse one client/transport for connection pooling.
- For SOCKS5, use golang.org/x/net/proxy to build a dialer.
Go (net/http) proxy FAQ
Does http.ProxyURL support authentication?
Yes. Embed the username and password in the URL you pass to url.Parse, and Go sends the Proxy-Authorization header automatically.
Docs, solutions & blog
Premium residential proxiesCost-efficient rotating residential pool from €2.00/GB for bulk scraping and monitoring.Elite residential proxiesCurated high-trust pool with city and ISP targeting for hard anti-bot targets.Quickstart docsCredentials, endpoints, and your first proxied request.Proxy glossaryPlain-English definitions for residential proxies, rotation, anti-bot, and scraping terms.