diff --git a/onionshare/onionshare.py b/onionshare/onionshare.py index 57983354..c87b7811 100644 --- a/onionshare/onionshare.py +++ b/onionshare/onionshare.py @@ -50,7 +50,12 @@ class OnionShare(object): self.transparent_torification = transparent_torification # use stealth onion service + self.set_stealth(stealth) + + def set_stealth(self, stealth): self.stealth = stealth + if self.onion: + self.onion.stealth = stealth def choose_port(self): """ diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py index db32a957..f002903a 100644 --- a/onionshare_gui/onionshare_gui.py +++ b/onionshare_gui/onionshare_gui.py @@ -176,6 +176,10 @@ class OnionShareGui(QtWidgets.QMainWindow): self.starting_server_error.emit(e.args[0]) return + except onionshare.onion.TorTooOld as e: + self.starting_server_error.emit(e.args[0]) + return + t = threading.Thread(target=start_onion_service, kwargs={'self': self}) t.daemon = True t.start() diff --git a/onionshare_gui/options.py b/onionshare_gui/options.py index 74645fcc..0f4b626c 100644 --- a/onionshare_gui/options.py +++ b/onionshare_gui/options.py @@ -66,9 +66,9 @@ class Options(QtWidgets.QVBoxLayout): When the 'stealth' checkbox is toggled, let the onionshare app know. """ if state == 2: - self.app.stealth = True + self.app.set_stealth(True) else: - self.app.stealth = False + self.app.set_stealth(False) def set_stealth_enabled(self, enabled): """