From ab4f789eff85ab148ea6f3ba19c8aaa576864fe7 Mon Sep 17 00:00:00 2001 From: Adrian-Ken Rueegsegger Date: Fri, 10 Feb 2012 23:12:54 +0100 Subject: [PATCH] Add correct torrc entries for obfuscated bridges The lines have the following form: Bridge obfs2 ${IP address of bridge} ... ClientTransportPlugin obfs2 exec ${/path/to/obfsproxy} --managed --- .../torproject/android/service/TorService.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java index 80daaab3..70f29a1c 100644 --- a/src/org/torproject/android/service/TorService.java +++ b/src/org/torproject/android/service/TorService.java @@ -1462,16 +1462,28 @@ public class TorService extends Service implements TorServiceConstants, TorConst showToolbarNotification(getString(R.string.notification_using_bridges) + ": " + bridgeList, TRANSPROXY_NOTIFY_ID, R.drawable.tornotification, -1); + boolean obfsBridges = prefs.getBoolean(TorConstants.PREF_BRIDGES_OBFUSCATED, false); + String bridgeCfgKey = "bridge"; + + if (obfsBridges) + { + bridgeCfgKey = bridgeCfgKey + " obfs2"; + } + StringTokenizer st = new StringTokenizer(bridgeList,bridgeDelim); while (st.hasMoreTokens()) { - mBinder.updateConfiguration("bridge", st.nextToken(), false); + mBinder.updateConfiguration(bridgeCfgKey, st.nextToken(), false); } - + + if (obfsBridges) + { + mBinder.updateConfiguration("ClientTransportPlugin","obfs2 exec " + fileObfsProxy.getAbsolutePath() + " --managed", false); + } + mBinder.updateConfiguration("UpdateBridgesFromAuthority", "0", false); - } else {