Fix the saving of bridges received from CensorshipCircumvention API - need to also save the bridges_enabled setting else TorSettingsTab doesn't show them

This commit is contained in:
Miguel Jacq 2021-12-14 14:32:00 +11:00
parent b03823267e
commit 1aa67f8406
No known key found for this signature in database
GPG key ID: EEA4341C6D97A0B6
2 changed files with 4 additions and 2 deletions

View file

@ -47,7 +47,7 @@ class CensorshipCircumvention(object):
self.common.log( self.common.log(
"CensorshipCircumvention", "CensorshipCircumvention",
"__init__", "__init__",
"Using Meek with CensorShipCircumvention API", "Using Meek with CensorshipCircumvention API",
) )
self.api_proxies = self.meek.meek_proxies self.api_proxies = self.meek.meek_proxies
if onion: if onion:
@ -58,7 +58,7 @@ class CensorshipCircumvention(object):
self.common.log( self.common.log(
"CensorshipCircumvention", "CensorshipCircumvention",
"__init__", "__init__",
"Using Tor with CensorShipCircumvention API", "Using Tor with CensorshipCircumvention API",
) )
(socks_address, socks_port) = self.onion.get_tor_socks_port() (socks_address, socks_port) = self.onion.get_tor_socks_port()
self.api_proxies = { self.api_proxies = {
@ -256,6 +256,7 @@ class CensorshipCircumvention(object):
"save_settings", "save_settings",
"Saving settings with automatically-obtained bridges", "Saving settings with automatically-obtained bridges",
) )
self.settings.set("bridges_enabled", True)
self.settings.save() self.settings.save()
return True return True
else: else:

View file

@ -172,6 +172,7 @@ class AutoConnectTab(QtWidgets.QWidget):
self.active = False self.active = False
self.tor_con.fail.emit() self.tor_con.fail.emit()
self.open_tor_settings() self.open_tor_settings()
self.close_this_tab.emit()
def _censorship_progress_update(self, progress, summary): def _censorship_progress_update(self, progress, summary):
self.use_bridge_widget.progress.setValue(int(progress)) self.use_bridge_widget.progress.setValue(int(progress))