Back to all posts
Verify Proxy Exit IP and Protocol Routing

Verify Proxy Exit IP and Protocol Routing

November 19, 2026

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.

This 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.

Prerequisites

You 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.

Use these placeholders in the examples:

  • GATEWAY_HOST — the gateway host for your proxy
  • HTTP_PORT — the HTTP port used for both HTTP and HTTPS
  • SOCKS5_PORT — the SOCKS5 port, available on Pro and Business plans
  • USERNAME — the proxy username
  • PASSWORD — the proxy password

Configure the Proxy in cURL

RoProxy 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:

curl -x http://USERNAME:PASSWORD@GATEWAY_HOST:HTTP_PORT https://api.ipify.org?format=json

The 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.

Run the same command without -x to see your direct address:

curl https://api.ipify.org?format=json

Compare the two responses. If they match, the proxy is not being applied or your request is bypassing it.

Check the Exit IP Over HTTP

HTTP works the same way:

curl -x http://USERNAME:PASSWORD@GATEWAY_HOST:HTTP_PORT http://httpbin.org/ip

The response shows the origin address the target sees. If it matches the proxy gateway rather than your local network, routing is working.

Configure the Proxy in Python

Python'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:

import json
import urllib.request

proxy_url = 'http://USERNAME:PASSWORD@GATEWAY_HOST:HTTP_PORT'

proxy_handler = urllib.request.ProxyHandler({
    'http': proxy_url,
    'https': proxy_url,
})

opener = urllib.request.build_opener(proxy_handler)
urllib.request.install_opener(opener)

with urllib.request.urlopen('https://httpbin.org/ip') as response:
    data = json.loads(response.read())
    print(data['origin'])

The same proxy URL works for both http and https keys because the gateway port handles both protocols.

If you prefer the requests library, pass the same mapping to the proxies argument:

import requests

proxies = {
    'http': 'http://USERNAME:PASSWORD@GATEWAY_HOST:HTTP_PORT',
    'https': 'http://USERNAME:PASSWORD@GATEWAY_HOST:HTTP_PORT',
}

response = requests.get('https://httpbin.org/ip', proxies=proxies)
print(response.json()['origin'])

Use SOCKS5 on Pro and Business Plans

Pro 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:

curl -x socks5h://USERNAME:PASSWORD@GATEWAY_HOST:SOCKS5_PORT https://api.ipify.org?format=json

In Python with requests, install requests[socks] and use the same scheme:

proxies = {
    'http': 'socks5h://USERNAME:PASSWORD@GATEWAY_HOST:SOCKS5_PORT',
    'https': 'socks5h://USERNAME:PASSWORD@GATEWAY_HOST:SOCKS5_PORT',
}

Understand Sticky and Timed Modes

Each 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.

To verify which mode you are on, check the exit IP at regular intervals:

for i in 1 2 3 4 5; do
  curl -s -x http://USERNAME:PASSWORD@GATEWAY_HOST:HTTP_PORT https://api.ipify.org?format=json
  echo
  sleep 30
done

If 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.

Troubleshooting Common Problems

The Exit IP Matches Your Direct IP

If the proxied and direct requests return the same address, the proxy is not in the path. Check for:

  • A typo in GATEWAY_HOST or HTTP_PORT
  • Special characters in USERNAME or PASSWORD that are not URL-encoded
  • Environment variables such as HTTP_PROXY or HTTPS_PROXY overriding your settings
  • A NO_PROXY list that includes the target domain

You Receive HTTP 407

A 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.

You Receive HTTP 502

A 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.

cURL Ignores the Proxy

cURL 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.

Conclusion

Checking 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.