JustProxies

Examples

curl recipes

4-min readcurl
A pile of curl recipes you can paste, adapt and ship. Replace USER and PASS with the credentials from your order.

A single request

The bare minimum — a GET through the proxy:

shell
$ curl -x http://USER:[email protected]:8080 https://api.ipify.org

HTTPS targets

curl handles the CONNECT tunnelling automatically. There's nothing extra to configure for HTTPS targets.

shell
$ curl -x http://USER:[email protected]:8080 \
       https://example.com/api/v2/products?page=3
No proxy-side TLS
The proxy URL is http:// even when the target is HTTPS. The client→proxy hop is the only thing inside that scheme; the actual TLS happens end-to-end between curl and the target.

Sticky session

Append -session-XXXX to the username to keep the same exit IP across requests:

shell
# Three requests — same exit IP
$ for i in 1 2 3; do
    curl -s -x http://USER-session-CART42:[email protected]:8080 \
         https://api.ipify.org
    echo
  done

Pick any opaque token. Two clients using the same token will share an IP for the session lifetime (~10 minutes by default).

Country targeting

For automatic routing, do nothing — the gateway picks an exit per request. For a specific country, append -country-XX (lowercase ISO-2) to the username:

shell
# Force exits in Germany
$ curl -x http://USER-country-de:[email protected]:8080 \
       https://api.ipify.org

# Combine with sticky session — same IP, in Germany, for the session
$ curl -x http://USER-country-de-session-S1:[email protected]:8080 \
       https://api.ipify.org
Country targeting requires the country to be in the available list — see /coverage. If the gateway can't honour the constraint it returns 503 with a X-Proxy-Reason header.

POST with body

shell
$ curl -x http://USER:[email protected]:8080 \
       -X POST \
       -H "Content-Type: application/json" \
       --data '{"price": 1299, "currency": "USD"}' \
       https://target.com/api/quote

Custom headers and User-Agent

shell
# Custom UA + Accept-Language
$ curl -x http://USER:[email protected]:8080 \
       -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 14_4) AppleWebKit/537.36" \
       -H "Accept-Language: en-GB,en;q=0.9" \
       https://target.com/

We pass headers through unchanged. We don't inject our own; we don't rewrite yours.

Debugging — what shipped, what came back

Add -v for the connection trace and -D - to dump response headers to stdout:

shell
$ curl -v -D - \
       -x http://USER:[email protected]:8080 \
       https://example.com 2>&1 | head -40
Quick reachability test
If only the proxy hop is suspect, point curl at any tiny target that always works (https://api.ipify.org, https://httpbin.org/ip). If those work, the problem is on the target side, not ours.
Found a gap, or something wrong?
A real human reads support email.