replacing FascistFirewalling with ReachableAddresses

svn:r21827
This commit is contained in:
Jacob Appelbaum 2010-03-06 04:46:53 +00:00
parent 28571b9510
commit 3c8c7417f2
3 changed files with 18 additions and 19 deletions

View File

@ -50,19 +50,21 @@ android:dialogTitle="Enter a custom relay nickname"
</PreferenceScreen>
<PreferenceScreen android:title="FascistFirewalling">
<PreferenceCategory android:title="ReachableAddresses">
<CheckBoxPreference
android:key="pref_fascist_firewall"
android:title="Fascist Firewall"
android:key="pref_reachable_addresses"
android:defaultValue="false"
android:title="ReachableAddresses"
android:summary="Run as a client behind a firewall with restrictive policies"
android:enabled="true"></CheckBoxPreference>
android:enabled="false"></CheckBoxPreference>
<EditTextPreference android:key="pref_fascist_firewall_ports"
android:defaultValue="80,443"
<EditTextPreference
android:key="pref_reachable_addresses_ports"
android:defaultValue="*:80,*:443"
android:title="Reachable ports"
android:summary="Ports reachable behind a restrictive firewall"
android:dialogTitle="Enter ports"
/>
</PreferenceScreen>
</PreferenceCategory>
</PreferenceScreen>

View File

@ -460,7 +460,7 @@ public class Orbot extends Activity implements OnClickListener, TorConstants, On
boolean becomeRelay = prefs.getBoolean(PREF_OR, false);
boolean fascistFirewall = prefs.getBoolean(PREF_FASCIST_FIREWALL,false);
boolean ReachableAddresses = prefs.getBoolean(PREF_REACHABLE_ADDRESSES,false);
enableTransparentProxy = prefs.getBoolean(PREF_TRANSPARENT, false);
@ -518,22 +518,19 @@ public class Orbot extends Activity implements OnClickListener, TorConstants, On
try
{
if (fascistFirewall)
if (ReachableAddresses)
{
String fascistFirewallPorts =
prefs.getString(PREF_FASCIST_FIREWALL_PORTS, "80,443");
torrcText.append("FascistFirewall 1");
torrcText.append('\n');
torrcText.append("FirewallPorts ");
String ReachableAddressesPorts =
prefs.getString(PREF_REACHABLE_ADDRESSES_PORTS, "*:80,*:443");
torrcText.append("ReachableAddresses ");
// We should verify this and someday, the Exception will matter :-)
torrcText.append(fascistFirewallPorts);
torrcText.append(ReachableAddressesPorts);
torrcText.append('\n');
}
}
catch (Exception e)
{
Toast.makeText(this,"Your FascistFirewall settings caused an exception!",
Toast.makeText(this,"Your ReachableAddresses settings caused an exception!",
Toast.LENGTH_LONG).show();
}

View File

@ -37,8 +37,8 @@ public interface TorConstants {
public final static String PREF_OR = "pref_or";
public final static String PREF_OR_PORT = "pref_or_port";
public final static String PREF_OR_NICKNAME = "pref_or_nickname";
public final static String PREF_FASCIST_FIREWALL = "pref_fascist_firewall";
public final static String PREF_FASCIST_FIREWALL_PORTS = "pref_fascist_firewall_ports";
public final static String PREF_REACHABLE_ADDRESSES = "pref_reachable_addresses";
public final static String PREF_REACHABLE_ADDRESSES_PORTS = "pref_reachable_addresses_ports";
public final static String PREF_TRANSPARENT = "pref_transparent";