mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-29 10:26:12 +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
|
$ 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
|
||||||
|
|
||||||
|
|
|
@ -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 = ""
|
||||||
|
|
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue