How to Test a Proxy Connection
You can test a proxy connection by sending a simple HTTP request through the gateway and verifying the exit IP address. This quick check confirms authentication, network selection, and geo-targeting are working before you start a larger project like web scraping or price monitoring.
- Use curl or wget for a quick command-line test of proxy connectivity.
- Check the exit IP with a service like ipinfo.io to confirm location targeting.
- Test in your actual software environment, like Python or a headless browser.
How to test a proxy connection with curl
Use the curl command with the --proxy flag to send a test request through your proxy gateway. This method instantly shows if the proxy accepts your credentials and forwards traffic. The basic syntax is curl -x http://USERNAME:PASSWORD@gw.rotatingproxy.cc:7070 https://ipinfo.io/ip. Put your proxy user's login and password in place of USERNAME and PASSWORD, adding targeting options like _net.res_cc.us to the username. A successful test returns an IP address from the targeted location, not your own. If you get an error like 407, review your authentication details in the proxy user setup.
How to check the proxy IP address and location
Verify the exit IP and its geolocation by requesting data from an IP information service through the proxy. After establishing a connection, query endpoints like https://ipinfo.io/json or https://httpbin.org/ip. The response will include the IP, country, and often city details, confirming your cc or city targeting is active. For example, using USERNAME_net.mob_cc.de_city.berlin should return a German mobile IP. This step is crucial for use cases like rank tracking where location matters. For more on IP types, see our guide on residential vs datacenter proxies.
Testing a proxy connection in Python
Test within your Python environment using the requests library to mimic your production scraper's behavior. Configure a session with the proxy dictionary pointing to our gateway. Here is a basic test script:
import requests
proxy = {
'http': 'http://USERNAME:PASSWORD@gw.rotatingproxy.cc:7070',
'https': 'http://USERNAME:PASSWORD@gw.rotatingproxy.cc:7070'
}
response = requests.get('https://ipinfo.io/ip', proxies=proxy)
print('Exit IP:', response.text.strip())
If this works, your Python setup is correct. For advanced setups with sessions, refer to our Python requests integration guide. Testing here helps avoid issues when you move to full-scale market research data collection.
How to test SOCKS5 proxy connection
Test the SOCKS5 proxy on port 7071 using curl with the --socks5 flag or a compatible library. The command is curl --socks5 USERNAME:PASSWORD@gw.rotatingproxy.cc:7071 https://ipinfo.io/ip. Note that the username format, including options like _net.dc, remains the same. SOCKS5 is often preferred for its protocol agnosticism. Confirm it works before integrating with tools that require SOCKS, such as some Playwright configurations. For a comparison, read about HTTP vs SOCKS5 proxies.
Testing proxy connection in a browser or headless browser
Configure your browser's manual proxy settings to use the gateway for a real-world test. In Chrome or Firefox, set the proxy server to gw.rotatingproxy.cc, port 7070, and use your full proxy username and password in the authentication prompt. Then visit an IP check site. For headless browsers like Puppeteer, launch with the --proxy-server argument and handle authentication programmatically. This test is vital for ad verification or localization testing where browser rendering is key. Detailed steps are in our Chrome proxy settings guide.
What to do if the proxy test fails
Diagnose a failed test by checking common issues: insufficient balance, incorrect credentials, or an invalid network option. First, ensure your account has a positive balance by visiting the Overview in your dashboard; traffic stops at zero balance. Second, verify your proxy user's login and password, and that its allowed networks match the net. option in your username. Third, confirm the option syntax in the username is correct, using underscores to separate keys. For error-specific help, see articles on error 407 or timeouts.
Testing sticky sessions and IP rotation
Verify sticky session behavior by including a sid (session ID) and ttl in your test username. Make several requests using the same full proxy string, like USERNAME_net.res_cc.us_sid.abc123_ttl.30, and check if the IP remains consistent across requests within the ttl window. To test rotation, omit the sid and observe a different IP on each new connection. This is important for managing state in social media management tools.
Questions
Why does my proxy test show my real IP instead of a proxy IP?
This usually means the request is not being routed through the proxy. Double-check that your client software is correctly configured to use the gateway host and port, and that proxy authentication is enabled. In code, ensure the proxy dictionary or environment variable is being applied to the specific request.
Can I test the proxy without spending balance?
No, all traffic through the gateway is metered and deducted from your prepaid balance, including small test requests. However, a single request to check an IP uses a negligible amount of data (a few kilobytes). Monitor your usage in the dashboard's Usage section.
How can I verify that city or state targeting is functioning?
Use a geo-IP service that returns city-level data, like <code>https://ipinfo.io/city</code>, through your proxy connection. For a US state test, include <code>st.ca</code> in your username and verify the response indicates California. Remember, city targeting is only available for residential and mobile networks.
My test works with curl but fails in my Python script. Why?
This often points to an environment issue, such as library-specific proxy configuration or SSL certificate verification. Ensure you are using the correct proxy dictionary format and that no other proxy environment variables (like HTTP_PROXY) are interfering. Consult our Python integration guide for exact syntax.
What is the best website to test proxy connection speed?
We recommend testing speed with the actual target website you plan to use, as performance can vary by destination. For a generic test, you can time a request to a reliable, low-latency endpoint like <code>https://httpbin.org/bytes/1024</code>. Note that we do not provide SLA or speed guarantees, as performance depends on many external factors.
How can I test that my proxy rotates IPs on each request?
Write a simple loop in your preferred language that makes multiple requests to an IP checking endpoint without using a session ID. Log the IP from each response; they should differ. For a quick check, run the curl command from the first section multiple times in a row from your terminal.
Start with one top-up, use any network
Create an account in a minute, add $40 or more, and the same balance pays for residential, mobile, datacenter and ISP traffic.