diff --git a/docs/configuration.rst b/docs/configuration.rst index ebbd3a0c..e830066f 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -600,10 +600,22 @@ Description ``scheme://host`` as key. See `Requests' proxy documentation`_ for more details. - Note: If a proxy URLs does not include a scheme, + Note: If a proxy URL does not include a scheme, ``http://`` is assumed. +extractor.*.proxy-env +--------------------- +Type + ``bool`` +Default + ``false`` +Description + Collect proxy configuration information from environment variables + (``HTTP_PROXY``, ``HTTPS_PROXY``, ``NO_PROXY``) + and Windows Registry settings. + + extractor.*.source-address -------------------------- Type diff --git a/gallery_dl/extractor/common.py b/gallery_dl/extractor/common.py index 61d35f41..090823e1 100644 --- a/gallery_dl/extractor/common.py +++ b/gallery_dl/extractor/common.py @@ -345,6 +345,9 @@ class Extractor(): headers.clear() ssl_options = ssl_ciphers = 0 + # .netrc Authorization headers are alwsays disabled + session.trust_env = True if self.config("proxy-env", False) else False + browser = self.config("browser") if browser is None: browser = self.browser