HI
API Tools

HTTPie proxy

An HTTPie proxy is an HTTPie invocation that sends the request through an upstream proxy via --proxy (or HTTP(S)_PROXY). It is the fastest way to confirm an Aethyn exit IP, a country suffix, and that credentials work, with readable JSON instead of cURL's raw dump.

Why a residential HTTPie proxy

When a scraper fails, the first question is whether the proxy itself is the problem or the client is. HTTPie answers that in one command: point --proxy at proxy.aethyn.io:2099, hit an IP-echo endpoint, and read the exit. A residential HTTPie proxy is also how you sample a geo-fenced API or storefront without writing a script — the same username suffixes that Guzzle and Requests use (-country-us, -session-<id>, -lifetime-<minutes>) work on the CLI. Specify the proxy for both the http and https schemes; HTTPie will not inherit one from the other. HTTPS still uses the HTTP proxy URL because CONNECT tunnels the TLS session. Environment variables are convenient and dangerous: they apply to every HTTPie (and many other) processes in that shell until you unset them. Prefer --proxy on the command you mean to proxy, and keep a timeout in mind — residential paths are slower than a direct hit on httpbin.

Setup steps

  1. 1Install HTTPie: pip install httpie (or brew install httpie).
  2. 2Pass --proxy for http and https schemes.
  3. 3Hit an IP echo endpoint to confirm the exit.
  4. 4Change the username suffix to test targeting.

Code

HTTPie with --proxy
https --proxy=http:http://aethyn-XXXXX-country-us:PASSWORD@proxy.aethyn.io:2099 \
      --proxy=https:http://aethyn-XXXXX-country-us:PASSWORD@proxy.aethyn.io:2099 \
      --timeout=30 \
      GET https://httpbin.org/ip
Via environment variables
export HTTPS_PROXY="http://aethyn-XXXXX:PASSWORD@proxy.aethyn.io:2099"
export HTTP_PROXY="$HTTPS_PROXY"
https --timeout=30 GET https://httpbin.org/ip
unset HTTP_PROXY HTTPS_PROXY
Sticky session check
USER="aethyn-XXXXX-country-us-session-abc123-lifetime-10"
PROXY="http://$USER:PASSWORD@proxy.aethyn.io:2099"
https --proxy=http:$PROXY --proxy=https:$PROXY --timeout=30 GET https://httpbin.org/ip
https --proxy=http:$PROXY --proxy=https:$PROXY --timeout=30 GET https://httpbin.org/ip
# both should show the same exit IP
SOCKS5 with remote DNS
https --proxy=http:socks5h://aethyn-XXXXX:PASSWORD@proxy.aethyn.io:1099 \
      --proxy=https:socks5h://aethyn-XXXXX:PASSWORD@proxy.aethyn.io:1099 \
      --timeout=30 \
      GET https://httpbin.org/ip

Replace aethyn-XXXXX and PASSWORD with your dashboard credentials. See the full targeting reference and protocol/port list.

Troubleshooting

HTTPie proxy failures cluster around three mistakes. First, setting --proxy only for http and then requesting an https:// URL: HTTPie goes direct, you see your real IP, and you conclude the credentials are wrong. Pass both --proxy=http:... and --proxy=https:... with the same http:// proxy URL. Second, 407: the username:password pair in the URL is wrong, or a targeting suffix landed on the password. Rebuild from the dashboard. Third, hanging requests: HTTPie waits on a dead residential exit unless you pass --timeout=30. SOCKS5 is --proxy=http:socks5h://...@proxy.aethyn.io:1099 (and the same for https); without the h, DNS resolves locally and leaks the real location. Unset HTTP_PROXY and HTTPS_PROXY when you are done or the next unrelated httpie call will silently leave through Aethyn and bill bandwidth.

Tips

  • Specify the proxy for both http and https schemes.
  • Env vars apply globally — unset them when finished.
  • Great for quickly confirming a country suffix geolocates correctly.
  • Pass --timeout=30; residential exits are slower than a direct connection.

HTTPie proxy FAQ

How do I set a proxy in HTTPie?
Pass --proxy=http:http://aethyn-XXXXX:PASSWORD@proxy.aethyn.io:2099 and the same URL again as --proxy=https:... . One HTTP proxy URL covers both schemes via CONNECT. Add --timeout=30 so a dead exit fails instead of hanging.
How do I set proxies for both HTTP and HTTPS in HTTPie?
Pass --proxy=http:... and --proxy=https:... together, or set the HTTP_PROXY and HTTPS_PROXY environment variables. HTTPie does not copy one scheme's proxy onto the other.
Why does HTTPie still show my real IP?
The https:// request went out without an https proxy. Set --proxy=https: to the same http://aethyn-... URL you used for http, or export HTTPS_PROXY. A 407 means auth failed, not that the proxy was skipped.
Can I test a sticky session with HTTPie?
Yes. Put -session-<id>-lifetime-<minutes> on the username and run two requests with the same URL. Both should return the same exit IP from httpbin.org/ip for the lifetime you set.
Does HTTPie support SOCKS5?
Yes. Use socks5h://aethyn-XXXXX:PASSWORD@proxy.aethyn.io:1099 as the proxy URL for both schemes. The h makes DNS resolve at the proxy so the lookup does not leak.

Ready to wire up HTTPie?

Get your credentials and route your first HTTPie request through residential IPs in minutes.

Docs, solutions & blog

Related integrations

All integrations