From 3ea75a35770eda2590f9bbc409f9843077919b08 Mon Sep 17 00:00:00 2001 From: Jakub Roztocil Date: Sat, 31 Aug 2019 12:31:32 +0200 Subject: [PATCH] Document `$ALL_PROXY` support (close #676) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s been supported by python-requests since v2.11.0 (2016-08-08) https://github.com/psf/requests/blob/d79024f246d1037c4196da6027c2c2be08719c8d/HISTORY.md#2110-2016-08-08 --- README.rst | 12 +++++++----- httpie/cli.py | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index e0f7a320..a9947f01 100644 --- a/README.rst +++ b/README.rst @@ -893,10 +893,10 @@ With Basic authentication: Environment variables --------------------- -You can also configure proxies by environment variables ``HTTP_PROXY`` and -``HTTPS_PROXY``, and the underlying Requests library will pick them up as well. -If you want to disable proxies configured through the environment variables for -certain hosts, you can specify them in ``NO_PROXY``. +You can also configure proxies by environment variables ``ALL_PROXY``, +``HTTP_PROXY`` and ``HTTPS_PROXY``, and the underlying Requests library will +pick them up as well. If you want to disable proxies configured through +the environment variables for certain hosts, you can specify them in ``NO_PROXY``. In your ``~/.bash_profile``: @@ -910,7 +910,9 @@ In your ``~/.bash_profile``: SOCKS ----- -Homebrew-installed HTTPie comes with SOCKS proxy support out of the box. To enable SOCKS proxy support for non-Homebrew installations, you'll need to install ``requests[socks]`` manually using ``pip``: +Homebrew-installed HTTPie comes with SOCKS proxy support out of the box. +To enable SOCKS proxy support for non-Homebrew installations, you'll +might need to install ``requests[socks]`` manually using ``pip``: .. code-block:: bash diff --git a/httpie/cli.py b/httpie/cli.py index 5ff0465a..43121e22 100644 --- a/httpie/cli.py +++ b/httpie/cli.py @@ -517,7 +517,8 @@ network.add_argument( help=""" String mapping protocol to the URL of the proxy (e.g. http:http://foo.bar:3128). You can specify multiple proxies with - different protocols. + different protocols. The environment variables $ALL_PROXY, $HTTP_PROXY, + and $HTTPS_proxy are supported as well. """ )