mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-21 18:22:30 +01:00
[common] add 'proxy-env' option
(#6134, #6455) disable using environment proxies by default
This commit is contained in:
parent
0a72a5009c
commit
c82f3db098
@ -600,10 +600,22 @@ Description
|
|||||||
``scheme://host`` as key.
|
``scheme://host`` as key.
|
||||||
See `Requests' proxy documentation`_ for more details.
|
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.
|
``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
|
extractor.*.source-address
|
||||||
--------------------------
|
--------------------------
|
||||||
Type
|
Type
|
||||||
|
@ -345,6 +345,9 @@ class Extractor():
|
|||||||
headers.clear()
|
headers.clear()
|
||||||
ssl_options = ssl_ciphers = 0
|
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")
|
browser = self.config("browser")
|
||||||
if browser is None:
|
if browser is None:
|
||||||
browser = self.browser
|
browser = self.browser
|
||||||
|
Loading…
Reference in New Issue
Block a user