More verbose and consistent Meek exception logging

This commit is contained in:
Miguel Jacq 2022-03-22 14:22:16 +11:00
parent e5306bd967
commit f455cedefe
4 changed files with 29 additions and 23 deletions

View file

@ -181,6 +181,11 @@ class AutoConnectTab(QtWidgets.QWidget):
self.tor_con.start(self.curr_settings)
def _got_no_bridges(self):
self.common.log(
"AutoConnectTab",
"_got_no_bridges",
"Could not obtain bridges, so falling back to trying built-in obfs4 bridges",
)
# If we got no bridges, try connecting again using built-in obfs4 bridges
self.curr_settings.set("bridges_type", "built-in")
self.curr_settings.set("bridges_builtin_pt", "obfs4")

View file

@ -236,14 +236,10 @@ class MoatThread(QtCore.QThread):
# Start Meek so that we can do domain fronting
try:
self.meek.start()
except MeekNotFound:
self.common.log("MoatThread", "run", f"Could not find meek-client")
self.bridgedb_error.emit()
return
except MeekNotRunning:
self.common.log(
"MoatThread", "run", f"Ran meek-client, but there was an error"
)
except (
MeekNotFound,
MeekNotRunning,
):
self.bridgedb_error.emit()
return