Python
Both requests and httpx take the proxy as a plain URL, so the login and the targeting keys on the username are the only things that change between requests.
Point your client at the gateway
gate.avocadoproxies.com on port 8080, with your login and password as standard proxy Basic auth in the URL. Append targeting keys to the username; this example exits in Germany.
python
import requests
PROXY = "http://USERNAME-cc-de:PASSWORD@gate.avocadoproxies.com:8080"
response = requests.get(
"https://example.com",
proxies={"http": PROXY, "https": PROXY},
timeout=30,
)
print(response.status_code)A rotating-per-request loop
Leave the session key off entirely and the gateway is free to hand out a new exit address on every connection. That is the default, and the right one for wide, independent requests that should not look related to each other.
python
import requests
# No -sid-: every request in this loop may leave from a different address.
PROXY = "http://USERNAME:PASSWORD@gate.avocadoproxies.com:8080"
for i in range(10):
r = requests.get(
"https://example.com",
proxies={"http": PROXY, "https": PROXY},
timeout=30,
)
print(i, r.status_code)Sticky or rotating is one string. Add
-sid-a1b2c3 to the username and every request carrying it holds the same exit address; add -ttl-30 to bound how long, in minutes. Drop both and you are back to the rotating loop above. See Sticky sessions for lifetimes and patterns.- Test it. Run either snippet above. A
200means the tunnel and your login both worked. Open Dashboard → Usage → Live and watch the request land within a few seconds. - For anything else, see the troubleshooting page.