1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[common] add 'proxy-env' option

(#6134, #6455)
disable using environment proxies by default
This commit is contained in:
Mike Fährmann 2024-11-15 17:59:54 +01:00
parent 0a72a5009c
commit c82f3db098
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 16 additions and 1 deletions

View File

@ -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

View File

@ -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