mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-03 11:56:06 -04:00
Merge branch 'develop' of github.com:onionshare/onionshare into upgrade-flask
This commit is contained in:
commit
6955aabbe7
4 changed files with 93 additions and 66 deletions
|
@ -181,7 +181,9 @@ class AutoConnectTab(QtWidgets.QWidget):
|
|||
self.tor_con.start(self.curr_settings)
|
||||
|
||||
def _got_no_bridges(self):
|
||||
# If we got no bridges, try connecting again using built-in obfs4 bridges
|
||||
# If we got no bridges, even after trying the default bridges
|
||||
# provided by the Censorship API, try connecting again using
|
||||
# our built-in obfs4 bridges
|
||||
self.curr_settings.set("bridges_type", "built-in")
|
||||
self.curr_settings.set("bridges_builtin_pt", "obfs4")
|
||||
self.curr_settings.set("bridges_enabled", True)
|
||||
|
@ -244,6 +246,18 @@ class AutoConnectTab(QtWidgets.QWidget):
|
|||
bridge_settings = self.censorship_circumvention.request_settings(
|
||||
country=country
|
||||
)
|
||||
|
||||
if not bridge_settings:
|
||||
# Fall back to trying the default bridges from the API
|
||||
self.common.log(
|
||||
"AutoConnectTab",
|
||||
"use_bridge_connect_clicked",
|
||||
"Falling back to trying default bridges provided by the Censorship Circumvention API",
|
||||
)
|
||||
bridge_settings = (
|
||||
self.censorship_circumvention.request_default_bridges()
|
||||
)
|
||||
|
||||
self.common.gui.meek.cleanup()
|
||||
|
||||
if bridge_settings and self.censorship_circumvention.save_settings(
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue