Raise an Alert dialog when failing to connect to Tor even after trying to circumvent censorship, so the user knows they need to configure settings manually

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

View File

@ -30,7 +30,7 @@ from . import strings
from .threads import CensorshipCircumventionThread
from .gui_common import GuiCommon, ToggleCheckbox
from .tor_connection import TorConnectionWidget
from .widgets import Alert
class AutoConnectTab(QtWidgets.QWidget):
"""
@ -164,13 +164,19 @@ class AutoConnectTab(QtWidgets.QWidget):
def _got_no_bridges(self):
self.use_bridge_widget.progress.hide()
self.use_bridge_widget.progress_label.hide()
self.active = False
self.tor_con.fail.emit()
Alert(
self.common,
strings._("gui_autoconnect_circumventing_censorship_no_bridges"),
QtWidgets.QMessageBox.Critical,
)
self.common.log(
"AutoConnectTab",
"_got_no_bridges",
"Could not get bridges for this country. Raising TorSettingsTab",
)
self.active = False
self.tor_con.fail.emit()
self.open_tor_settings()
self.close_this_tab.emit()

View File

@ -56,7 +56,7 @@
"gui_autoconnect_circumventing_censorship_starting_meek": "Starting Meek for domain-fronting",
"gui_autoconnect_circumventing_censorship_requesting_bridges": "Requesting bridges from the Tor Censorship Circumvention API",
"gui_autoconnect_circumventing_censorship_got_bridges": "Got bridges! Trying to reconnect to Tor",
"gui_autoconnect_circumventing_censorship_no_bridges": "Could not find bridges. Opening manual Tor network settings",
"gui_autoconnect_circumventing_censorship_no_bridges": "OnionShare still couldn't connect to Tor, even after trying to find bridges.<br><br>Please try configuring the Tor Network settings manually.",
"gui_settings_window_title": "Settings",
"gui_settings_autoupdate_label": "Check for new version",
"gui_settings_autoupdate_option": "Notify me when a new version is available",