From fc2dcafafc7d6d513c24e8aeb90b42e3d6712817 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Wed, 17 Jan 2018 16:30:12 +1100 Subject: [PATCH] Clarify that obfs4 bridges can't be used as custom bridges, and that obfs4proxy is needed for obfs4 bridges --- onionshare_gui/settings_dialog.py | 15 ++++++++------- share/locale/en.json | 3 ++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/onionshare_gui/settings_dialog.py b/onionshare_gui/settings_dialog.py index 1138b839..1540876e 100644 --- a/onionshare_gui/settings_dialog.py +++ b/onionshare_gui/settings_dialog.py @@ -146,14 +146,15 @@ class SettingsDialog(QtWidgets.QDialog): self.tor_bridges_no_bridges_radio = QtWidgets.QRadioButton(strings._('gui_settings_tor_bridges_no_bridges_radio_option', True)) self.tor_bridges_no_bridges_radio.toggled.connect(self.tor_bridges_no_bridges_radio_toggled) - # OBFS4 option radio - self.tor_bridges_use_obfs4_radio = QtWidgets.QRadioButton(strings._('gui_settings_tor_bridges_obfs4_radio_option', True)) - self.tor_bridges_use_obfs4_radio.toggled.connect(self.tor_bridges_use_obfs4_radio_toggled) + # obfs4 option radio # if the obfs4proxy binary is missing, we can't use obfs4 transports - if system != 'Windows' and system != 'Darwin': - (self.tor_path, self.tor_geo_ip_file_path, self.tor_geo_ipv6_file_path, self.obfs4proxy_file_path) = common.get_tor_paths() - if not os.path.isfile(self.obfs4proxy_file_path): - self.tor_bridges_use_obfs4_radio.setEnabled(False) + (self.tor_path, self.tor_geo_ip_file_path, self.tor_geo_ipv6_file_path, self.obfs4proxy_file_path) = common.get_tor_paths() + if not os.path.isfile(self.obfs4proxy_file_path): + self.tor_bridges_use_obfs4_radio = QtWidgets.QRadioButton(strings._('gui_settings_tor_bridges_obfs4_radio_option_no_obfs4proxy', True)) + self.tor_bridges_use_obfs4_radio.setEnabled(False) + else: + self.tor_bridges_use_obfs4_radio = QtWidgets.QRadioButton(strings._('gui_settings_tor_bridges_obfs4_radio_option', True)) + self.tor_bridges_use_obfs4_radio.toggled.connect(self.tor_bridges_use_obfs4_radio_toggled) # Custom bridges radio and textbox self.tor_bridges_use_custom_radio = QtWidgets.QRadioButton(strings._('gui_settings_tor_bridges_custom_radio_option', True)) diff --git a/share/locale/en.json b/share/locale/en.json index b8ac38e5..cdd89c1e 100644 --- a/share/locale/en.json +++ b/share/locale/en.json @@ -94,7 +94,8 @@ "gui_settings_tor_bridges": "Tor Bridge support", "gui_settings_tor_bridges_no_bridges_radio_option": "Don't use bridges", "gui_settings_tor_bridges_obfs4_radio_option": "Use obfs4 pluggable transports", - "gui_settings_tor_bridges_custom_radio_option": "Use custom bridges", + "gui_settings_tor_bridges_obfs4_radio_option_no_obfs4proxy": "Use obfs4 pluggable transports (requires obfs4proxy)", + "gui_settings_tor_bridges_custom_radio_option": "Use custom bridges (non-pluggable transports)", "gui_settings_tor_bridges_custom_label": "You can get bridges from https://bridges.torproject.org", "gui_settings_tor_bridges_invalid": "None of the bridges you supplied seem to be valid, so they've been ignored.\nPlease try again with valid bridges.", "gui_settings_button_save": "Save",