GBProxies

How to Use Proxies with cURL

cURL is the fastest way to check that your proxy login works and to see which IP and country you get.

Steps

  1. Copy your username and password from the console
  2. Run curl with -x for the proxy and -U for the login
  3. Check the IP and country in the answer
  4. Change the username to switch country or session

Example code

# rotating, any country
curl -x http://gw.gbproxies.cc:10000 -U "USERNAME:PASSWORD" https://api.ipify.org

# Germany, same IP for 30 minutes
curl -x http://gw.gbproxies.cc:10000 -U "USERNAME-cc-de-sid-test1-ttl-30:PASSWORD" https://api.ipify.org

# SOCKS5
curl -x socks5h://gw.gbproxies.cc:10001 -U "USERNAME:PASSWORD" https://api.ipify.org

Replace USERNAME and PASSWORD with the proxy login from the Proxies page of the console. Port 10000 is residential HTTP; see the ports of every product below.

Tips

  • socks5h resolves the target name on the proxy side
  • Add -v to see the CONNECT step and the status code

Common questions

What does 407 mean?

The login was not accepted: check the username, password and remaining GB for that product.

How to Use Proxies with cURL