]> 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 67cee7745b3546988fc09b08f54241cc8333fff7..55e5263b8516800293eea74e5b7f62cf09b7300d 100644 (file)
@@ -2,7 +2,7 @@
 Tor Browser Launcher
 https://github.com/micahflee/torbrowser-launcher/
 
-Copyright (c) 2013-2017 Micah Lee <micah@micahflee.com>
+Copyright (c) 2013-2021 Micah Lee <micah@micahflee.com>
 
 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation
@@ -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