]> git.lizzy.rs Git - torbrowser-launcher.git/blobdiff - torbrowser_launcher/launcher.py
Do not refresh the key each run
[torbrowser-launcher.git] / torbrowser_launcher / launcher.py
index 3d0898ee9c75aa69c1e7588c57d061461e622cac..55e5263b8516800293eea74e5b7f62cf09b7300d 100644 (file)
@@ -549,17 +549,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:
@@ -568,7 +557,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