From 0695ee5abbc79826ad17889a57428a2b9953696e Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Wed, 28 Oct 2015 23:16:32 -0400 Subject: [PATCH] tor: Switch to obfs4proxy. Replaces scramblesuit, and also supports obfs3. Also add tor-geoipdb which is useful for bridges. --- actions/tor | 2 +- plinth/modules/tor/__init__.py | 8 ++++---- plinth/modules/tor/tor.py | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/actions/tor b/actions/tor index eea45473b..0dcd0c423 100755 --- a/actions/tor +++ b/actions/tor @@ -74,7 +74,7 @@ Exitpolicy reject *:* Exitpolicy reject6 *:* # Enable obfsproxy -ServerTransportPlugin obfs3,scramblesuit exec /usr/bin/obfsproxy managed +ServerTransportPlugin obfs3,obfs4 exec /usr/bin/obfs4proxy ExtORPort auto # Enable transparent proxy diff --git a/plinth/modules/tor/__init__.py b/plinth/modules/tor/__init__.py index 514b9f78d..bfef63613 100644 --- a/plinth/modules/tor/__init__.py +++ b/plinth/modules/tor/__init__.py @@ -61,11 +61,11 @@ def diagnose(): results.append(action_utils.diagnose_port_listening(ports['obfs3'], 'tcp4')) - results.append([_('Scramblesuit transport registered'), - 'passed' if 'scramblesuit' in ports else 'failed']) - if 'scramblesuit' in ports: + results.append([_('Obfs4 transport registered'), + 'passed' if 'obfs4' in ports else 'failed']) + if 'obfs4' in ports: results.append(action_utils.diagnose_port_listening( - ports['scramblesuit'], 'tcp4')) + ports['obfs4'], 'tcp4')) results.append(_diagnose_url_via_tor('http://www.debian.org', '4')) results.append(_diagnose_url_via_tor('http://www.debian.org', '6')) diff --git a/plinth/modules/tor/tor.py b/plinth/modules/tor/tor.py index c961327d7..8a9f26334 100644 --- a/plinth/modules/tor/tor.py +++ b/plinth/modules/tor/tor.py @@ -92,7 +92,9 @@ def on_install(): actions.superuser_run('tor', ['enable-apt-transport-tor']) -@package.required(['tor', 'obfsproxy', 'torsocks', 'apt-transport-tor'], +@package.required(['tor', 'tor-geoipdb', 'torsocks', + 'obfs4proxy', + 'apt-transport-tor'], on_install=on_install) def index(request): """Service the index page"""