From a0451065a2f90b49812dc2a23a06daa3e53ade74 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Sat, 28 Apr 2018 21:52:01 +0200 Subject: [PATCH] Start with bridges if tor_use_bridges enabled --- src/Tor/TorManager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Tor/TorManager.py b/src/Tor/TorManager.py index ec483271..e2914cf3 100644 --- a/src/Tor/TorManager.py +++ b/src/Tor/TorManager.py @@ -89,7 +89,11 @@ class TorManager(object): tor_dir = os.path.dirname(self.tor_exe) startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW - self.tor_process = subprocess.Popen(r"%s -f torrc" % self.tor_exe, cwd=tor_dir, close_fds=True, startupinfo=startupinfo) + cmd = r"%s -f torrc --defaults-torrc torrc-defaults --ignore-missing-torrc" % self.tor_exe + if config.tor_use_bridges: + cmd += " --UseBridges 1" + + self.tor_process = subprocess.Popen(cmd, cwd=tor_dir, close_fds=True, startupinfo=startupinfo) for wait in range(1, 10): # Wait for startup time.sleep(wait * 0.5) self.enabled = True