From 339e950dc70718104d82ea635252cababa1a276b Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Tue, 3 May 2016 08:07:30 +0100 Subject: [PATCH] Add section on SOCKS proxies. --- docs/user/advanced.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index efdc406a..f15ac553 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -544,6 +544,29 @@ any request to the given scheme and exact hostname. Note that proxy URLs must include the scheme. +SOCKS +^^^^^ + +.. versionadded:: 2.10.0 + +In addition to basic HTTP proxies, requests also supports proxies using the +SOCKS protocol. This is an optional feature that requires that additional +third-party libraries be installed before use. + +You can get the dependencies for this feature from ``pip``: + +.. code-block:: bash + + $ pip install requests[socks] + +Once you've installed those dependencies, using a SOCKS proxy is just as easy +as using a HTTP one:: + + proxies = { + 'http': 'socks5://user:pass@host:port', + 'https': 'socks5://user:pass@host:port' + } + .. _compliance: Compliance