Skip to content

← All integrations

curl / shell

No library required. curl’s own proxy flags speak standard HTTP proxy auth, and so does every tool that reads the HTTPS_PROXY environment variable.

-x and --proxy-user

-x takes gate.avocadoproxies.com:8080; --proxy-user takes your login and password, with targeting keys appended to the login.

bash
curl -x gate.avocadoproxies.com:8080 \
  --proxy-user "USERNAME-cc-de:PASSWORD" \
  https://example.com

Environment variables

Set HTTPS_PROXY once in the shell and every request in that session routes through us without a flag: curl, and also most CLIs and package managers that respect the convention.

bash
export HTTPS_PROXY="http://USERNAME-cc-de:PASSWORD@gate.avocadoproxies.com:8080"
export HTTP_PROXY="$HTTPS_PROXY"

curl https://example.com
# any tool that honours HTTPS_PROXY (wget, pip, git, most CLIs) now goes through us too
HTTP_PROXY is only used for http:// URLs. On residential and mobile, use https:// destinations: a plain http:// request is answered with a redirect to the same address on https://, and a tunnel to port 80 is refused. Premium residential also carries plain http:// destinations.
A password embedded in a proxy URL is still a password. Export the variable in your own shell or CI secret store, and never commit a script with the URL filled in.

Sticky or rotating

Plain USERNAME rotates: each curl invocation above may exit from a different address. Add -sid-<id> and every call sharing that id holds one address, for up to the minutes you set with -ttl-.

bash
curl -x gate.avocadoproxies.com:8080 \
  --proxy-user "USERNAME-sid-checkout42-ttl-30:PASSWORD" \
  https://example.com
See Sticky sessions for lifetimes, ceilings and patterns that work across a multi-step shell script.
  • Test it. Run the first command above with -v for verbose output. A 200 means auth and the tunnel both worked. Open Dashboard → Usage → Live and watch it land within a few seconds.
  • For anything else, see the troubleshooting page.
curl / shell · Avocado Proxies