add some stuff for transproxy

svn:r22438
This commit is contained in:
Jacob Appelbaum 2010-05-28 17:02:13 +00:00
parent 783709eace
commit a86557941b
1 changed files with 18 additions and 2 deletions

View File

@ -20,7 +20,7 @@ public class TorTransProxy {
private final static String IPTABLES_ADD = " -A "; private final static String IPTABLES_ADD = " -A ";
private final static String IPTABLES_DELETE = " -D "; private final static String IPTABLES_DELETE = " -D ";
private final static String IPTABLES_DROP_ALL = " -j DROP ";
private static boolean hasRoot = false; private static boolean hasRoot = false;
/** /**
@ -57,7 +57,23 @@ public class TorTransProxy {
} }
/*
public static int setIptablesDropAll() {
// iptables -A OUTPUT -j DROP
}
public static int setTransparentProxying() {
// Flush everything from iptables first
purgeNatIptables();
// Setup DNS redirection
setDNSProxying();
//
//
}
*/
public static boolean purgeNatIptables() { public static boolean purgeNatIptables() {
StringBuilder res = new StringBuilder(); StringBuilder res = new StringBuilder();
try { try {