Developer hub

Developer Proxy Examples

Use these guides when you need proxies in scripts, API clients, command-line tools, browser automation or test environments. The focus is practical setup: working formats, authentication, timeouts and verification.

Test outside the application first

Before adding a proxy to code, test it with a small independent tool. This separates proxy problems from application problems. If the proxy fails everywhere, fix the proxy format or credentials. If it works in the tester but fails in code, inspect environment variables, library support, SSL behavior and timeout settings.

Developers should also log the proxy ID, target host, HTTP status, elapsed time and error type. Without those fields, failed requests become impossible to diagnose after the fact.

Python Requests proxyConfigure HTTP and HTTPS proxies with timeouts and error handling.
cURL proxy examplesUse HTTP, HTTPS and SOCKS5 proxy flags from the command line.
Node.js proxy guideSet proxies for fetch, Axios, Undici and environment variables.
PHP proxy examplesUse cURL proxy options and basic PHP connection checks.
Postman proxy setupConfigure and test proxies before API debugging.
Playwright proxiesUse proxies for browser automation and location-aware testing.
Selenium proxiesConfigure browser sessions for automated checks.
Puppeteer proxiesLaunch Chromium with proxy settings and authenticated flows.

Developer checklist

  • Keep proxy credentials outside source control.
  • Use explicit connect and read timeouts.
  • Separate retry logic from proxy rotation logic.
  • Retry only safe requests unless your app is idempotent.
  • Log status code, proxy ID and elapsed time for every failed request.
  • Use the proxy tester before changing code.

Static or rotating proxies for code?

Use static private proxies while building and debugging because the network path stays stable. Add rotation only after the request flow is reliable and the target can tolerate session changes. For logged-in flows, carts and dashboards, sticky sessions are usually safer.

For API testing, proxies are useful for location checks, failover behavior and CDN routing tests. They are not a replacement for proper rate-limit handling.

FAQ

Should proxy credentials be in environment variables?

Yes. Environment variables or secret managers are safer than hardcoding credentials in source files.

Why does cURL work but my code fails?

Your library may use a different proxy format, ignore environment variables, reject the certificate path or use a shorter timeout.

What is the first debugging step?

Test the same proxy and target outside the application, then compare the exact request format.

Related BuyProxies guides

These related pages help connect the setup, troubleshooting and buying decisions instead of treating each proxy problem in isolation.

Proxy authentication failed

Use this guide as the next step when you need a more specific proxy workflow.

HTTP 407 proxy authentication required

Use this guide as the next step when you need a more specific proxy workflow.

Proxy timeout errors

Use this guide as the next step when you need a more specific proxy workflow.

Best proxies for scraping

Use this guide as the next step when you need a more specific proxy workflow.

How many proxies for scraping

Use this guide as the next step when you need a more specific proxy workflow.

How many proxies for multiple accounts

Use this guide as the next step when you need a more specific proxy workflow.

Scroll to Top