Proxy Setup for Python, Node.js and Docker
Start with the program that sends your request. Choose its proxy setting, make one bounded request, then check whether the expected destination response arrived.
By Proxies.sx Team. Reviewed .
Configure the client that sends your requests
Choose a guide for your client, or use the comparison below to find the right setting.
Choose the setting that owns the request
| Your workload | Start here | Check before scaling |
|---|---|---|
| Python HTTPX | Client-level proxy configuration | Singular proxy argument, credentials and environment settings |
| Python aiohttp | Request proxy and proxy headers | Installed version and trust_env choice |
| Node built-in fetch | Runtime-supported environment opt-in | Node version, global configuration and bypasses |
| Containerized application | Container versus build versus daemon settings | The actual HTTP client inside the container |
| Unexpected direct requests | HTTP_PROXY and NO_PROXY diagnosis | Environment inheritance and matching rules |
These are application configuration guides. A successful IP echo request tells you about that request. Test the destination response your job needs before treating the integration as complete.
Prepare the connection inputs once
The downloadable Python and Node examples use separate environment variables for the proxy server, username and password. Keep PROXY_SERVER free of credentials. TARGET_URL is optional and defaults to a JSON IP echo endpoint.
For the Proxies.sx Pool Gateway, use http://gw.proxies.sx:7000 for these HTTP-proxy examples. Obtain the proxy username and separate proxy password from your dashboard. Use the proxy password shown there; it is separate from your dashboard login password. Check the current connection documentation.
This Bash setup prompts for the password without echoing it. Replace the fictional username with your account's complete routing username before running a request. In a deployed worker, use your existing secret-management system instead.
export PROXY_SERVER='http://gw.proxies.sx:7000'
export PROXY_USERNAME='psx_example-mbl-any-sid-job1'
read -r -s -p 'Proxy password: ' PROXY_PASSWORD
export PROXY_PASSWORD
printf '\n'The username builder explains session and country tokens. The format converter helps when another application expects a URL instead of separate fields. Encode each credential once when constructing a URL; raw credential fields expect the original values.
Keep the request path visible
Keep the proxy's scheme separate from the destination's scheme. An HTTP proxy can carry an HTTPS connection through CONNECT. Changing the URL prefix without checking the provider's listener can break a working setup.
Preserve TLS verification. The Python samples accept an optional PROXY_TEST_CA bundle for an approved private CA. The Node sample can use Node's NODE_EXTRA_CA_CERTS startup setting when a deployment needs an additional trusted CA.
Evidence behind the examples
We ran 19 local routing checks with HTTPX 0.28.1, aiohttp 3.14.5 and Node v24.16.0. An authenticated proxy and two destination servers ran on loopback. The HTTPS fixture used a locally trusted test certificate, and the proxy counted the requests and tunnels it received.
The checks cover authenticated HTTPS, rejected credentials, environment opt-in and exact-IP bypasses. Docker's separate check confirms environment injection into a disposable container with networking disabled. These fixtures measure configuration behavior; they do not measure carrier inventory, public IP rotation or paid-network performance.
Move from the symptom to the next check
If the proxy rejects authentication, follow the 407 troubleshooting guide. If the target rate-limits the application, review Retry-After and bounded retries. Increasing retries before identifying the failing layer can add traffic without fixing the cause.
Once the connection and target response work, measure traffic with the bandwidth calculator. Check current mobile availability and live pricing for a purchase decision. The agent documentation describes the service APIs.