Skip to main content
Working examples for the most common scripting tools. Each section uses CodeGroup tabs: your language choice syncs across the page.

Basic GET request

curl -x http://USER:PASS@HOST:PORT https://api.ipify.org

SOCKS5

# Either form works
curl --socks5 USER:PASS@HOST:PORT https://api.ipify.org
curl -x socks5h://USER:PASS@HOST:PORT https://api.ipify.org   # DNS via proxy

Timing / debugging

# Total request time
curl -x http://USER:PASS@HOST:PORT -o /dev/null -s -w "%{time_total}\n" https://api.ipify.org

# Full handshake trace
curl -x http://USER:PASS@HOST:PORT -v https://api.ipify.org

Rotating IPs per request

Force a fresh session ID per call so each request gets a new IP on the sticky port.
import uuid, requests

def get_proxy():
    sid = uuid.uuid4().hex[:8]
    return f"http://USER-session-{sid}-lifetime-1:PASS@HOST:STICKY_PORT"

for _ in range(10):
    r = requests.get("https://api.ipify.org", proxies={"https": get_proxy()})
    print(r.text)  # new IP each time

Quick country check

curl -x http://USER:PASS@HOST:PORT https://ipinfo.io

Other Python clients

import httpx
with httpx.Client(proxies="http://USER:PASS@HOST:PORT") as c:
    print(c.get("https://api.ipify.org").text)

Common mistakes

  • “Works in cURL but not in my script”: set BOTH http and https proxy keys, not just one
  • URL-encoded characters in password: make sure they’re not being decoded twice
  • SOCKS5 in Python requests: install requests[socks]
  • Tunnel connection failed: 466 Limit Reached: hit a bandwidth or thread cap. See Error codes.
See Common issues for diagnosing weirder failures.