Using http.Client
To use Fixie for specific http requests, you can create a custom http.Client:
If you intend to use Fixie for all outbound requests, an alternative is to use the HTTP_PROXY and HTTPS_PROXY environment variables. Go honors these environment variables by default. You can set HTTP_PROXY and HTTPS_PROXY in your application, typically in main.go:
Using net/proxy package
Golang's net/proxy package provides a Socks5 proxy dialer that can be used with Fixie Socks. This dialer can be used for any TCP connection. The example below uses this to make an HTTP request:
Related static IP guides
Platform-specific guides for giving your Go app a static outbound IP:
- Go on Heroku → API
- Go on Vercel → API
- Go on Render → API
- Go on Fly.io → API
- Go on AWS Lambda → API
- Go on Heroku → Postgres
See the full list of static IP guides for every supported language, platform, and destination.
Is this guide useful?
Having issues? Please reach out to our team here.