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
This commit is contained in:
Adrian-Ken Rueegsegger 2012-02-10 23:12:54 +01:00
parent c21be28cf3
commit ab4f789eff
1 changed files with 15 additions and 3 deletions

View File

@ -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
{