curl and environment variables
Verify your dedicated static IPv4 from the terminal with curl (via -x or shell proxy variables), and inspect proxy rejections using curl -v.
On this page8
Because curl supports all three Prontaro proxy schemes (https://, http://, and socks5h://) out of the box, it is the quickest way to confirm credentials and outbound routing before wiring them into application code.
Step 1. Get your proxy URL
- Open IP addresses in your Prontaro dashboard (my.prontaro.com/ips) and select your dedicated IPv4.
- Copy the
HTTPSproxy string under Proxy credentials (or create dedicated credentials for this script).
Export the proxy string to PRONTARO_PROXY_URL:
export PRONTARO_PROXY_URL="https://user:pass@<entry>.prontaro.io:443"Step 2. Verify your outbound IP
Pass the proxy string with -x (short for --proxy) and request https://api.ipify.org:
curl -fsS -x "$PRONTARO_PROXY_URL" https://api.ipify.org
203.0.113.10The output should match your dedicated IPv4. The -fsS flags hide the progress meter, keep error messages visible, and exit non-zero on HTTP 4xx/5xx — ideal for shell scripts and CI jobs.
Once this check succeeds, you can restrict destinations in the dashboard (IP addresses → Proxy credentials → Access). Do not add destination restrictions before running this test, or api.ipify.org will return 403 because the host is not on your allowlist.
Proxy schemes: https://, http://, and socks5h://
A single set of proxy credentials works across all three ports. Switching protocols in curl only requires changing the URL passed to -x:
| Scheme and port | Example | When to use |
|---|---|---|
https:// (:443) |
https://user:pass@<entry>.prontaro.io:443 |
Default choice: encrypts proxy credentials over TLS and opens an end-to-end CONNECT tunnel |
http:// (:8080) |
http://user:pass@<entry>.prontaro.io:8080 |
Older curl builds without HTTPS-proxy support (target HTTPS stays end-to-end encrypted) |
socks5h:// (:1080) |
socks5h://user:pass@<entry>.prontaro.io:1080 |
Testing SOCKS5 routes with DNS resolved on the Prontaro node |
Using HTTP_PROXY, HTTPS_PROXY, and NO_PROXY
To route multiple CLI tools in one shell session through your static IP, export the standard proxy variables and always exclude local and metadata addresses via NO_PROXY:
export HTTPS_PROXY="$PRONTARO_PROXY_URL"
export HTTP_PROXY="$PRONTARO_PROXY_URL"
export https_proxy="$HTTPS_PROXY"
export http_proxy="$HTTP_PROXY"
export NO_PROXY="localhost,127.0.0.1,::1,169.254.169.254,.internal,.local"
export no_proxy="$NO_PROXY"
# curl picks up the proxy automatically without -x
curl -fsS https://api.ipify.orgExporting lowercase https_proxy and no_proxy alongside uppercase avoids surprises across tools that only check lowercase names; note that curl prefers lowercase https_proxy when both are set. To bypass the environment proxy for a single command, pass --noproxy '*'.
In production scripts, prefer explicit -x "$PRONTARO_PROXY_URL" over global variables so package managers, telemetry, and internal health checks do not consume your Prontaro traffic quota.
Debugging with curl -v: 407 and 403 errors
When application code surfaces a vague proxy tunnel failed error, reproduce the request from the same host using curl -v. The proxy’s < HTTP/1.1 ... response line contains the exact rejection code:
curl -v -x "$PRONTARO_PROXY_URL" https://api.example.com/v1/health| Proxy status | Cause | Fix |
|---|---|---|
407 access_denied |
Wrong password, revoked credentials, or newly created credentials still syncing | Wait 5–10 seconds after creation; verify active credentials under IP addresses |
403 source_denied |
Caller IP is not in the source allowlist | Add the IP under From in the credentials’ Access tab |
403 target_denied |
Destination host/port is not in the To list (or socks5:// resolved DNS locally) |
Add host:port under To in the dashboard (IP addresses → Proxy credentials → Access), and verify socks5h:// |
403 destination_denied |
Built-in block: RFC 1918 private ranges, loopback, IPv6, mail ports 25/465/587 |
Target a public IPv4 endpoint on an allowed port |
403 volume_exhausted |
Monthly traffic quota reached 100% | Add a traffic pack in the dashboard |
429 connection_limit |
Concurrent connection limit per IP exceeded | Reuse keep-alive connections in clients or review limits |
Common issues
- Unquoted shell variables. Always quote
-x "$PRONTARO_PROXY_URL"so shells do not split or expand special characters. - Silent failures without
-f. Without-f(--fail),curlexits0even when the target API returns403or500. - Stale lowercase
https_proxy. If an older lowercasehttps_proxyremains in your environment,curluses it instead ofHTTPS_PROXY. Check withenv | grep -i proxy.
Calling an API through a Relay URL
When a script or CI step cannot configure proxy flags, create a Relay for the partner host in the dashboard (IP addresses) and call it like any normal HTTPS endpoint:
export PRONTARO_RELAY_URL="https://relay-3f9c2a7e-5b1d-4c8a-9e60-1d2b3c4d5e6f.prontaro.run"
curl -fsS \
-H "Authorization: Bearer $PARTNER_API_TOKEN" \
"$PRONTARO_RELAY_URL/v1/status"If you enabled a password on the Relay (under IP addresses → Relay address → Access), pass it in the Prontaro-Relay-Auth header. The Prontaro node validates and strips Prontaro-Relay-Auth before forwarding the request, leaving your Authorization: Bearer ... header intact for the upstream API:
curl -fsS \
-H "Prontaro-Relay-Auth: $RELAY_LOGIN:$RELAY_PASSWORD" \
-H "Authorization: Bearer $PARTNER_API_TOKEN" \
"$PRONTARO_RELAY_URL/v1/status"See Relay URLs for details on TLS termination at the node and HTTP/1.1 behavior.
Next steps
- HTTP & SOCKS5 proxy — configure
accessandtargetsallowlists and zero-downtime rotation. - Node.js and TypeScript —
undici,axios, nativefetch, and SOCKS5. - Python —
requests,httpx, andaiohttp. - PHP — Guzzle, native
cURL, and Laravel.
Something wrong on this page? Contact us