diff --git a/cli/onionshare_cli/onionshare.py b/cli/onionshare_cli/onionshare.py index bd94100f..d055b639 100644 --- a/cli/onionshare_cli/onionshare.py +++ b/cli/onionshare_cli/onionshare.py @@ -74,6 +74,8 @@ class OnionShare(object): if self.local_only: self.onion_host = f"127.0.0.1:{self.port}" + if mode_settings.get("general", "client_auth"): + self.auth_string = "E2GOT5LTUTP3OAMRCRXO4GSH6VKJEUOXZQUC336SRKAHTTT5OVSA" return self.onion_host = self.onion.start_onion_service( diff --git a/desktop/src/onionshare/tab/mode/__init__.py b/desktop/src/onionshare/tab/mode/__init__.py index 66f9279a..2b78ffd0 100644 --- a/desktop/src/onionshare/tab/mode/__init__.py +++ b/desktop/src/onionshare/tab/mode/__init__.py @@ -241,12 +241,15 @@ class Mode(QtWidgets.QWidget): def start_onion_thread(self, obtain_onion_early=False): # If we tried to start with Client Auth and our Tor is too old to support it, # bail out early - if not self.app.onion.supports_stealth and self.settings.get("general", "client_auth"): - self.stop_server() - self.start_server_error( - strings._("gui_server_doesnt_support_stealth") - ) - else: + can_start = True + if ( + not self.server_status.local_only + and not self.app.onion.supports_stealth + and self.settings.get("general", "client_auth") + ): + can_start = False + + if can_start: self.common.log("Mode", "start_server", "Starting an onion thread") self.obtain_onion_early = obtain_onion_early self.onion_thread = OnionThread(self) @@ -255,6 +258,12 @@ class Mode(QtWidgets.QWidget): self.onion_thread.error.connect(self.starting_server_error.emit) self.onion_thread.start() + else: + self.stop_server() + self.start_server_error( + strings._("gui_server_doesnt_support_stealth") + ) + def start_scheduled_service(self, obtain_onion_early=False): # We start a new OnionThread with the saved scheduled key from settings self.common.settings.load()