Proxies

You can specify proxies to be used through the —proxy argument for eachprotocol (which is included in the value in case of redirects across protocols):

  1. $ http --proxy=http:http://10.10.1.10:3128 --proxy=https:https://10.10.1.10:1080 example.org

With Basic authentication:

  1. $ http --proxy=http:http://user:[email protected]:3128 example.org

Environment variables

You can also configure proxies by environment variables ALL_PROXY,HTTP_PROXY and HTTPS_PROXY, and the underlying Requests library willpick them up as well. If you want to disable proxies configured throughthe environment variables for certain hosts, you can specify them in NO_PROXY.

In your ~/.bash_profile:

  1. export HTTP_PROXY=http://10.10.1.10:3128
  2. export HTTPS_PROXY=https://10.10.1.10:1080
  3. export NO_PROXY=localhost,example.com

SOCKS

Homebrew-installed HTTPie comes with SOCKS proxy support out of the box.To enable SOCKS proxy support for non-Homebrew installations, you'llmight need to install requests[socks] manually using pip:

  1. $ pip install -U requests[socks]

Usage is the same as for other types of proxies:

  1. $ http --proxy=http:socks5://user:[email protected]:port --proxy=https:socks5://user:[email protected]:port example.org