Hey! For golang how to use forward http proxy, you can totally set the `HTTP_PROXY` env var, and the default `http.Client` will pick it up. But if you need more control, here's a quick snippet:
```go
proxyURL, _ := url.Parse("http://proxy-ip:port")
client := &http.Client{
Transport: &http.Transport{Proxy: http.ProxyURL(proxyURL)},
}
```
Works like a charm. If your proxy needs auth, check out `http.ProxyFromEnvironment` or set headers manually.
Btw, had timeout issues? Try tweaking `Transport` settings like `ResponseHeaderTimeout`.
```go
proxyURL, _ := url.Parse("http://proxy-ip:port")
client := &http.Client{
Transport: &http.Transport{Proxy: http.ProxyURL(proxyURL)},
}
```
Works like a charm. If your proxy needs auth, check out `http.ProxyFromEnvironment` or set headers manually.
Btw, had timeout issues? Try tweaking `Transport` settings like `ResponseHeaderTimeout`.
