mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-28 09:58:21 +01:00
Merge branch 'develop' of https://gitlab.com/dslackw/slpkg into develop
This commit is contained in:
commit
01d9580fe0
3 changed files with 3 additions and 2 deletions
|
@ -160,7 +160,7 @@ For further information, please read the manpage:
|
|||
|
||||
$ man slpkg
|
||||
|
||||
Edit the :code:`/etc/slpkg/slpkg.toml` file:
|
||||
Edit the configuration :code:`/etc/slpkg/slpkg.toml` file:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
|
|
@ -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 = ""
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue