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:
parent
c21be28cf3
commit
ab4f789eff
|
@ -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);
|
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);
|
StringTokenizer st = new StringTokenizer(bridgeList,bridgeDelim);
|
||||||
while (st.hasMoreTokens())
|
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);
|
mBinder.updateConfiguration("UpdateBridgesFromAuthority", "0", false);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue