[{"data":1,"prerenderedAt":35},["ShallowReactive",2],{"blog:post:en:verify-proxy-exit-ip-routing":3,"blog:related:en:verify-proxy-exit-ip-routing":22},{"slug":4,"lang":5,"title":6,"summary":7,"date":8,"tags":9,"tag_slugs":14,"thumbnail_url":15,"translations":16,"body":17,"asset_base":18,"checksum":19,"published_at":20,"content_updated_at":21},"verify-proxy-exit-ip-routing","en","Verify Proxy Exit IP and Protocol Routing","Confirm your proxy is routing traffic and hiding your real IP by checking the exit address over HTTP and HTTPS with cURL and Python.","2026-11-19",[10,11,12,13],"proxy","troubleshooting","python","curl",[10,11,12,13],"https://blog-api.ro-proxy.com/api/blog/posts/verify-proxy-exit-ip-routing/thumbnail.svg?lang=en",[5],"A proxy that looks connected can still leak your real address or fall back to a direct connection. Many teams discover the problem only after a scraper gets blocked or a test returns local data. Verifying the exit IP before you automate saves time and prevents silent failures.\n\nThis guide shows how to confirm that a proxy is actually carrying your traffic, how to test both HTTP and HTTPS through the same gateway port, and how to tell whether your IP is sticky or timed. The examples use cURL, Python standard library, and public IP endpoints.\n\n## Prerequisites\n\nYou need cURL and Python 3. No extra packages are required, though the `requests` library is an option if you already use it. You also need the proxy credentials for one proxy: username, password, gateway host, and HTTP port. If you have a Pro or Business plan, you also have a SOCKS5 port.\n\nUse these placeholders in the examples:\n\n- `GATEWAY_HOST` — the gateway host for your proxy\n- `HTTP_PORT` — the HTTP port used for both HTTP and HTTPS\n- `SOCKS5_PORT` — the SOCKS5 port, available on Pro and Business plans\n- `USERNAME` — the proxy username\n- `PASSWORD` — the proxy password\n\n## Configure the Proxy in cURL\n\nRoProxy assigns each proxy its own username and password, and the gateway host accepts both HTTP and HTTPS on the same HTTP port. To route a cURL request through the proxy, use the `-x` flag:\n\n```bash\ncurl -x http://USERNAME:PASSWORD@GATEWAY_HOST:HTTP_PORT https://api.ipify.org?format=json\n```\n\nThe proxy URL uses `http://` even when the destination is `https://`. The proxy handles the TLS tunnel to the target, so you do not change the scheme in the proxy URL.\n\nRun the same command without `-x` to see your direct address:\n\n```bash\ncurl https://api.ipify.org?format=json\n```\n\nCompare the two responses. If they match, the proxy is not being applied or your request is bypassing it.\n\n### Check the Exit IP Over HTTP\n\nHTTP works the same way:\n\n```bash\ncurl -x http://USERNAME:PASSWORD@GATEWAY_HOST:HTTP_PORT http://httpbin.org/ip\n```\n\nThe response shows the origin address the target sees. If it matches the proxy gateway rather than your local network, routing is working.\n\n## Configure the Proxy in Python\n\nPython's standard library can send traffic through an HTTP proxy without third-party packages. This example uses `urllib.request` and checks the exit IP with httpbin:\n\n```python\nimport json\nimport urllib.request\n\nproxy_url = 'http://USERNAME:PASSWORD@GATEWAY_HOST:HTTP_PORT'\n\nproxy_handler = urllib.request.ProxyHandler({\n    'http': proxy_url,\n    'https': proxy_url,\n})\n\nopener = urllib.request.build_opener(proxy_handler)\nurllib.request.install_opener(opener)\n\nwith urllib.request.urlopen('https://httpbin.org/ip') as response:\n    data = json.loads(response.read())\n    print(data['origin'])\n```\n\nThe same proxy URL works for both `http` and `https` keys because the gateway port handles both protocols.\n\nIf you prefer the `requests` library, pass the same mapping to the `proxies` argument:\n\n```python\nimport requests\n\nproxies = {\n    'http': 'http://USERNAME:PASSWORD@GATEWAY_HOST:HTTP_PORT',\n    'https': 'http://USERNAME:PASSWORD@GATEWAY_HOST:HTTP_PORT',\n}\n\nresponse = requests.get('https://httpbin.org/ip', proxies=proxies)\nprint(response.json()['origin'])\n```\n\n### Use SOCKS5 on Pro and Business Plans\n\nPro and Business plans include a SOCKS5 port. SOCKS5 can be useful when your client needs to resolve DNS at the proxy or carry non-HTTP traffic. In cURL, use the `socks5h` scheme so DNS resolution happens at the proxy:\n\n```bash\ncurl -x socks5h://USERNAME:PASSWORD@GATEWAY_HOST:SOCKS5_PORT https://api.ipify.org?format=json\n```\n\nIn Python with `requests`, install `requests[socks]` and use the same scheme:\n\n```python\nproxies = {\n    'http': 'socks5h://USERNAME:PASSWORD@GATEWAY_HOST:SOCKS5_PORT',\n    'https': 'socks5h://USERNAME:PASSWORD@GATEWAY_HOST:SOCKS5_PORT',\n}\n```\n\n## Understand Sticky and Timed Modes\n\nEach proxy runs in sticky or timed mode. Sticky mode keeps the same IP until the proxy rotates it or the IP fails. Timed mode changes the IP after an interval you set. On the Free plan, the IP changes on a fixed schedule and cannot be rotated by hand.\n\nTo verify which mode you are on, check the exit IP at regular intervals:\n\n```bash\nfor i in 1 2 3 4 5; do\n  curl -s -x http://USERNAME:PASSWORD@GATEWAY_HOST:HTTP_PORT https://api.ipify.org?format=json\n  echo\n  sleep 30\ndone\n```\n\nIf the address stays the same across checks, you are likely in sticky mode. If it changes after a set period without your intervention, you are likely in timed mode. This distinction matters for multi-account flows and long scraping jobs: sticky mode preserves identity across page loads, while timed mode spreads requests across addresses over time.\n\n## Troubleshooting Common Problems\n\n### The Exit IP Matches Your Direct IP\n\nIf the proxied and direct requests return the same address, the proxy is not in the path. Check for:\n\n- A typo in `GATEWAY_HOST` or `HTTP_PORT`\n- Special characters in `USERNAME` or `PASSWORD` that are not URL-encoded\n- Environment variables such as `HTTP_PROXY` or `HTTPS_PROXY` overriding your settings\n- A `NO_PROXY` list that includes the target domain\n\n### You Receive HTTP 407\n\nA 407 Proxy Authentication Required response means the username or password is rejected. Verify the credentials match the proxy exactly. RoProxy assigns separate credentials to each proxy, so do not reuse values from another proxy.\n\n### You Receive HTTP 502\n\nA 502 Bad Gateway usually means the proxy cannot reach the target or the target closed the connection. Retry the request, and if the failure continues, check whether the destination blocks proxy traffic.\n\n### cURL Ignores the Proxy\n\ncURL respects `http_proxy` and `https_proxy` environment variables. If they are set, an explicit `-x` flag still takes precedence for that command, but scripts that omit `-x` may use the environment instead. Run `env | grep -i proxy` to see what is active.\n\n## Conclusion\n\nChecking the exit IP is the fastest way to prove a proxy is routing traffic before you build automation on top of it. Test over both HTTP and HTTPS, confirm authentication works, and note whether your proxy stays on one address or rotates on a schedule. RoProxy gives each proxy its own username and password and lets you choose sticky or timed rotation, so a quick verification step keeps your scraper, test, or automation predictable.\n","https://blog-api.ro-proxy.com/api/blog/posts/verify-proxy-exit-ip-routing/assets","f8ce667eaa2cc3c2ae5e074292f72cb2dba7e52d67d49751292a631ad15ea9ae","2026-11-19T01:14:56.055844Z","2026-11-19T01:14:56.064803Z",[23,27,31],{"slug":24,"title":25,"summary":26},"diagnose-http-502-forward-proxy","How to Diagnose HTTP 502 Errors Behind a Forward Proxy","Trace the CONNECT tunnel, TLS handshake, and HTTP response to separate proxy-generated 502s from origin failures, then isolate, retry, and escalate the real cause.",{"slug":28,"title":29,"summary":30},"keep-proxy-credentials-out-of-logs-and-urls","Keep Proxy Credentials Out of Logs and URLs","Proxy credentials leak through URLs, debug logs, and shell history. Learn concrete patterns to keep them out of Python, Node.js, cURL, and CI.",{"slug":32,"title":33,"summary":34},"testing-http3-quic-with-proxies","Testing HTTP/3 (QUIC) Connectivity Through Proxies","Learn how to verify HTTP/3 support and graceful fallback to HTTP/1.1 by routing client traffic through proxies, capturing packets, and measuring latency for reliable API performance testing.",1796251609614]