From ebd0416f1d3d6bee5205e0b84f8459b68d239a39 Mon Sep 17 00:00:00 2001 From: irykoon Date: Wed, 14 Mar 2018 16:16:56 +0000 Subject: [PATCH] Support meek_lite Pluggable Transports on Windows and Mac According to https://lists.torproject.org/pipermail/tor-announce/2018-March/000153.html: Tor Browser 7.5.1 includes obfs4proxy (0.0.7), which supports meek_lite Pluggable Transports. Therefore, undo: https://github.com/micahflee/onionshare/pull/649 --- CHANGELOG.md | 4 ++++ onionshare_gui/settings_dialog.py | 11 ++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a03a151..33b94bcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # OnionShare Changelog +## 1.4 +* New feature: Support for meek_lite pluggable transports (Amazon and Azure) on Windows and Mac +* New feature: Support for custom obfs4 and meek_lite bridges on Windows and Mac + ## 1.3 * Major UI redesign, introducing many UX improvements diff --git a/onionshare_gui/settings_dialog.py b/onionshare_gui/settings_dialog.py index 7c81afc6..fe45c2a2 100644 --- a/onionshare_gui/settings_dialog.py +++ b/onionshare_gui/settings_dialog.py @@ -184,11 +184,6 @@ class SettingsDialog(QtWidgets.QDialog): self.tor_bridges_use_meek_lite_azure_radio = QtWidgets.QRadioButton(strings._('gui_settings_tor_bridges_meek_lite_azure_radio_option', True)) self.tor_bridges_use_meek_lite_azure_radio.toggled.connect(self.tor_bridges_use_meek_lite_azure_radio_toggled) - # meek_lite currently not supported on the version of obfs4proxy bundled with TorBrowser - if self.system == 'Windows' or self.system == 'Darwin': - self.tor_bridges_use_meek_lite_amazon_radio.hide() - self.tor_bridges_use_meek_lite_azure_radio.hide() - # Custom bridges radio and textbox self.tor_bridges_use_custom_radio = QtWidgets.QRadioButton(strings._('gui_settings_tor_bridges_custom_radio_option', True)) self.tor_bridges_use_custom_radio.toggled.connect(self.tor_bridges_use_custom_radio_toggled) @@ -835,10 +830,8 @@ class SettingsDialog(QtWidgets.QDialog): ipv6_pattern = re.compile("(obfs4\s+)?\[(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\]:[0-9]+\s+[A-Z0-9]+(.+)$") meek_lite_pattern = re.compile("(meek_lite)(\s)+([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+)(\s)+([0-9A-Z]+)(\s)+url=(.+)(\s)+front=(.+)") if ipv4_pattern.match(bridge) or \ - ipv6_pattern.match(bridge): - new_bridges.append(''.join(['Bridge ', bridge, '\n'])) - bridges_valid = True - if self.system != 'Windows' and self.system != 'Darwin' and meek_lite_pattern.match(bridge): + ipv6_pattern.match(bridge) or \ + meek_lite_pattern.match(bridge): new_bridges.append(''.join(['Bridge ', bridge, '\n'])) bridges_valid = True