HTTPie is a user-friendly command-line HTTP client with colorized output. Route requests through KnoxProxy with the --proxy flag or environment variables.
Use the --proxy flag to route through KnoxProxy.
http --proxy=https:http://USER:PASS@gw.knoxproxy.com:7000 \
https://httpbin.org/ipSet proxies for both protocols.
http --proxy=http:http://USER:PASS@gw.knoxproxy.com:7000 \
--proxy=https:http://USER:PASS@gw.knoxproxy.com:7000 \
https://httpbin.org/ipSet HTTP_PROXY for automatic proxying.
export HTTP_PROXY=http://USER:PASS@gw.knoxproxy.com:7000
export HTTPS_PROXY=http://USER:PASS@gw.knoxproxy.com:7000
http https://httpbin.org/ipTarget a country by modifying the proxy username.
http --proxy=https:http://USER-country-jp:PASS@gw.knoxproxy.com:7000 \
https://httpbin.org/ipAdd targeting headers alongside the proxy.
http --proxy=https:http://USER:PASS@gw.knoxproxy.com:7000 \
https://httpbin.org/ip \
X-KnoxProxy-Country:deDownload a file through the proxy.
http --proxy=https:http://USER:PASS@gw.knoxproxy.com:7000 \
--download https://example.com/file.zip#!/bin/bash
# KnoxProxy + HTTPie
export HTTP_PROXY="http://USER:PASS@gw.knoxproxy.com:7000"
export HTTPS_PROXY="http://USER:PASS@gw.knoxproxy.com:7000"
echo "Exit IP:"
http https://httpbin.org/ipEach http command invocation gets a fresh exit IP. For sticky sessions, use USER-session-{id} in the proxy username.
| Problem | Fix |
|---|---|
| ConnectionError: ProxyError(407 Proxy Authentication Required) | Check the proxy URL format: --proxy=https:http://USER:PASS@gw.knoxproxy.com:7000. URL-encode special characters. |
| http: error: argument --proxy: expected one argument | Use the correct format: --proxy=https:http://... (note the protocol prefix followed by colon). |
| ConnectionError: Connection refused | Verify port 7000 for HTTP proxy. Check DNS resolution for gw.knoxproxy.com. |
USER-country-de-city-berlin-session-profile07Order matters -- geo flags before the session flag. The session name is free text; use the profile ID so the mapping is self-documenting. Password stays as issued; no flags belong there. HTTP on :7000, SOCKS5 on :7001, same credentials.
HTTPie uses the --proxy=protocol:url format shown throughout this guide, while curl uses a simpler -x url flag for the same job. HTTPie also provides colorized, formatted output by default, which makes it easier to read JSON responses when testing KnoxProxy connections, though curl needs only the -x flag for a quick one-off request.
Yes. Add the proxy to your HTTPie config file at ~/.config/httpie/config.json under the "default_options" key: ["--proxy=https:http://USER:PASS@gw.knoxproxy.com:7000"]. Every future http command then routes through KnoxProxy automatically, without needing to type the --proxy flag or set environment variables in each new terminal session.
HTTPie supports SOCKS proxies only if the PySocks library is installed first: pip install PySocks. Once installed, use --proxy=https:socks5://USER:PASS@gw.knoxproxy.com:7001 to route requests through the KnoxProxy SOCKS5 gateway on port 7001 instead of the default HTTP port 7000 used elsewhere in this guide.
Use the --verbose or -v flag to print the full request and response, including proxy connection details: http -v --proxy=https:http://USER:PASS@gw.knoxproxy.com:7000 https://httpbin.org/ip. This shows the exact headers sent to the KnoxProxy gateway, which helps confirm your credentials and country targeting are being applied correctly before debugging further.
Rotating residential proxies -- 1 minute setup, instant activation, 14-day money-back guarantee.