]> git.lizzy.rs Git - torbrowser-launcher.git/blobdiff - torbrowser_launcher/launcher.py
Download Tor Browser Developers signing key using requests instead of gnupg, and...
[torbrowser-launcher.git] / torbrowser_launcher / launcher.py
index 70f309eea8971b9e2157521b82600f5f1f9a8b28..4f2ae8aa5331c9fc4ac27df0723e332e2a3fc63a 100644 (file)
@@ -66,6 +66,7 @@ class Launcher(QtWidgets.QMainWindow):
     def __init__(self, common, app, url_list):
         super(Launcher, self).__init__()
         self.common = common
+        self.common.refresh_keyring()
         self.app = app
 
         self.url_list = url_list
@@ -549,16 +550,6 @@ class DownloadThread(QtCore.QThread):
         self.common = common
         self.url = url
         self.path = path
-
-        # Use tor socks5 proxy, if enabled
-        if self.common.settings["download_over_tor"]:
-            socks5_address = "socks5h://{}".format(
-                self.common.settings["tor_socks_address"]
-            )
-            self.proxies = {"https": socks5_address, "http": socks5_address}
-        else:
-            self.proxies = None
-
     def run(self):
         with open(self.path, "wb") as f:
             try:
@@ -567,7 +558,7 @@ class DownloadThread(QtCore.QThread):
                     self.url,
                     headers={"User-Agent": "torbrowser-launcher"},
                     stream=True,
-                    proxies=self.proxies,
+                    proxies=self.common.proxies(),
                 )
 
                 # If status code isn't 200, something went wrong