Merge branch 'develop' of https://gitlab.com/dslackw/slpkg into develop

This commit is contained in:
maravtdm 2023-04-13 22:45:17 +02:00
commit 01d9580fe0
3 changed files with 3 additions and 2 deletions

View file

@ -160,7 +160,7 @@ For further information, please read the manpage:
$ man slpkg $ man slpkg
Edit the :code:`/etc/slpkg/slpkg.toml` file: Edit the configuration :code:`/etc/slpkg/slpkg.toml` file:
.. code-block:: bash .. code-block:: bash

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. # If you are going to use a proxy server, try to fill in these variables.
# Choose between http or socks proxy type, not both. # 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 # https://urllib3.readthedocs.io/en/stable/advanced-usage.html#socks-proxies
HTTP_PROXY_ADDRESS = "" HTTP_PROXY_ADDRESS = ""
SOCKS_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) http = ProxyManager(f'{self.http_proxy_address}', headers=proxy_default_headers)
elif self.socks_proxy_address: 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. try: # Try to import PySocks if it's installed.
from urllib3.contrib.socks import SOCKSProxyManager from urllib3.contrib.socks import SOCKSProxyManager
except (ModuleNotFoundError, ImportError): except (ModuleNotFoundError, ImportError):