Skip to main content
The console generates these examples with your real connection details filled in. The versions below read them from environment variables instead, so no password is written into your code:
Each example requests https://api.ipify.org, which returns the exit IP, and uses a 30-second timeout. Run it once and compare the IP with the resource or region you expect. With rotating dynamic sessions, later requests may use a different exit.

HTTP proxy

Works with dynamic residential (HTTP port) and with static IPs whose protocol is HTTP. HTTPS destinations are tunnelled through the HTTP proxy.

SOCKS5 proxy

For dynamic residential, use the SOCKS5 port from the console. socks5h:// resolves destination hostnames at the proxy.

Before you scale up

  • Keep a timeout on every request and handle HTTP status codes in your application.
  • Limit concurrency and add retries with backoff for transient errors.
  • Store credentials in a secret manager or server environment, never in a repository.