From f25f70fb4ae6d2585db4ddd316373ec2ed928de3 Mon Sep 17 00:00:00 2001 From: Jacob Appelbaum Date: Sat, 6 Mar 2010 02:06:00 +0000 Subject: [PATCH] Add FascistFirewall preference svn:r21825 --- Orbot/src/org/torproject/android/Orbot.java | 25 ++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Orbot/src/org/torproject/android/Orbot.java b/Orbot/src/org/torproject/android/Orbot.java index fda0426b..15d18a52 100644 --- a/Orbot/src/org/torproject/android/Orbot.java +++ b/Orbot/src/org/torproject/android/Orbot.java @@ -460,6 +460,8 @@ public class Orbot extends Activity implements OnClickListener, TorConstants, On boolean becomeRelay = prefs.getBoolean(PREF_OR, false); + boolean fascistFirewall = prefs.getBoolean(PREF_FASCIST_FIREWALL,false); + enableTransparentProxy = prefs.getBoolean(PREF_TRANSPARENT, false); if (hasRoot) @@ -514,7 +516,28 @@ public class Orbot extends Activity implements OnClickListener, TorConstants, On try { - if (becomeRelay && !useBridges) + if (fascistFirewall) + { + String fascistFirewallPorts = + prefs.getString(PREF_FASCIST_FIREWALL_PORTS, "80,443"); + + torrcText.append("FascistFirewall 1"); + torrcText.append('\n'); + torrcText.append("FirewallPorts "); + // We should verify this and someday, the Exception will matter :-) + torrcText.append(fascistFirewallPorts); + torrcText.append('\n'); + } + } + catch (Exception e) + { + Toast.makeText(this, "Your FascistFirewall settings caused an exception!", + Toast.LENGTH_LONG).show(); + } + + try + { + if (becomeRelay && !useBridges && !fascistFirewall) { int ORPort = Integer.parseInt(prefs.getString(PREF_OR_PORT, "9001")); String nickname = prefs.getString(PREF_OR_NICKNAME, "Orbot");