From a86557941b587f63e79805ce5ccd3641d023e3d3 Mon Sep 17 00:00:00 2001 From: Jacob Appelbaum Date: Fri, 28 May 2010 17:02:13 +0000 Subject: [PATCH] add some stuff for transproxy svn:r22438 --- .../android/service/TorTransProxy.java | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/org/torproject/android/service/TorTransProxy.java b/src/org/torproject/android/service/TorTransProxy.java index 5189380b..620ab3df 100644 --- a/src/org/torproject/android/service/TorTransProxy.java +++ b/src/org/torproject/android/service/TorTransProxy.java @@ -20,7 +20,7 @@ public class TorTransProxy { private final static String IPTABLES_ADD = " -A "; private final static String IPTABLES_DELETE = " -D "; - + private final static String IPTABLES_DROP_ALL = " -j DROP "; 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() { StringBuilder res = new StringBuilder(); try {