Integration · cURL
Use RoProxy with cURL
cURL is the quickest way to check that a proxy from RoProxy works before you wire it into code. Each proxy gives you a username, a password, a gateway host and an HTTP port, plus a SOCKS5 port on the Pro and Business plans. The commands below use them over HTTP and SOCKS5, set them once through environment variables so other command-line tools pick them up, and call the RoProxy API to rotate the IP or list your proxies with an API key.
Test a proxy
Each command prints the IP the website sees. HTTPS goes through the HTTP port with a CONNECT tunnel. The SOCKS5 command needs a Pro or Business proxy.
curl -x http://USERNAME:PASSWORD@GATEWAY_HOST:HTTP_PORT https://api.ipify.orgSet it once with environment variables
cURL, wget, pip, git and many other tools read these variables, so a whole shell session can go through one proxy.
export https_proxy="http://USERNAME:PASSWORD@GATEWAY_HOST:HTTP_PORT"
# cURL only reads the lowercase http_proxy; other tools read either case
export http_proxy="$https_proxy" HTTPS_PROXY="$https_proxy" HTTP_PROXY="$https_proxy"
curl https://api.ipify.orgRotate and list proxies with the API
Create an API key in the dashboard. Free proxies cannot be rotated by hand: their IP changes every 10 minutes on its own. On Pro and Business a manual rotation waits 30 seconds after the previous one; calling earlier returns 429.
# A new IP for one proxy
curl -X POST -H "Authorization: Bearer API_KEY" \
https://backend-api.ro-proxy.com/api/session/SESSION_ID/rotate
# Your proxies with their gateway, ports, strategy and current IP
curl -H "Authorization: Bearer API_KEY" \
"https://backend-api.ro-proxy.com/api/session?size=20"Reading the errors
CONNECT tunnel failed, response 407
The proxy refused the credentials: a wrong username or password, or an expired proxy.
Failed to connect (exit code 7)
Wrong gateway host or port. Use the proxy's own values; the HTTP and SOCKS5 ports differ.
Anything unclear
Add -v: cURL prints the CONNECT request and the proxy's status line before the website's response.
Frequently asked questions
Why does PowerShell ignore my proxy flags?
In Windows PowerShell, curl is an alias for Invoke-WebRequest. Call curl.exe to run the real cURL with the same flags.
What is the difference between --socks5 and --socks5-hostname?
--socks5-hostname lets the proxy resolve the domain name, so the DNS lookup does not leave from your machine; --socks5 resolves it locally.
How do I see why a proxy request fails?
Add -v. cURL prints the CONNECT request and the proxy's status code, such as 407 for wrong credentials, before anything from the website.
Related pages
Python
Connect requests and httpx over HTTP or SOCKS5 and rotate the IP from your script.
Node.js
Route fetch, axios and SOCKS5 traffic through a proxy and rotate the IP from code.
Vietnam
Vietnamese IPs on Business, sticky or rotating, over HTTP or SOCKS5.
cURL command generator
Turn a proxy string into a working cURL command for HTTP or SOCKS5, quoted for bash or PowerShell.