Updated for comments

This commit is contained in:
Dimitris Zlatanidis 2023-04-13 23:45:15 +03:00
parent cb15117691
commit 3030782a5b
2 changed files with 2 additions and 1 deletions

View file

@ -68,7 +68,7 @@ LFTP_MIRROR_OPTIONS = "-c mirror --parallel=100 --only-newer"
# If you are going to use a proxy server, try to fill in these variables.
# Choose between http or socks proxy type, not both.
# If you want to use a socks proxy, you need to install the PySocks package.
# For a socks proxy, you need to install the PySocks package.
# https://urllib3.readthedocs.io/en/stable/advanced-usage.html#socks-proxies
HTTP_PROXY_ADDRESS = ""
SOCKS_PROXY_ADDRESS = ""

View file

@ -175,6 +175,7 @@ class CheckUpdates(Configs):
http = ProxyManager(f'{self.http_proxy_address}', headers=proxy_default_headers)
elif self.socks_proxy_address:
# https://urllib3.readthedocs.io/en/stable/advanced-usage.html#socks-proxies
try: # Try to import PySocks if it's installed.
from urllib3.contrib.socks import SOCKSProxyManager
except (ModuleNotFoundError, ImportError):