[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] use new bundled xtables binary appropriately
commit e9396b7cc2beacf7e7b4f2d933512632c858b5e2
Author: Nathan Freitas <nathan@xxxxxxxxxxx>
Date: Sat Dec 28 09:21:25 2013 -0500
use new bundled xtables binary appropriately
---
src/org/torproject/android/service/TorServiceConstants.java | 5 +++++
src/org/torproject/android/service/TorTransProxy.java | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/org/torproject/android/service/TorServiceConstants.java b/src/org/torproject/android/service/TorServiceConstants.java
index c22b2bb..ce16be2 100644
--- a/src/org/torproject/android/service/TorServiceConstants.java
+++ b/src/org/torproject/android/service/TorServiceConstants.java
@@ -87,5 +87,10 @@ public interface TorServiceConstants {
public static final String OBFSPROXY_ASSET_KEY = "libobfsproxy.so";
public static final int MESSAGE_TRAFFIC_COUNT = 5;
+
+
+ //name of the iptables binary
+ public final static String IPTABLES_BINARY_ASSET_KEY = "libxtables.so";
+
}
diff --git a/src/org/torproject/android/service/TorTransProxy.java b/src/org/torproject/android/service/TorTransProxy.java
index f18d140..7760d92 100644
--- a/src/org/torproject/android/service/TorTransProxy.java
+++ b/src/org/torproject/android/service/TorTransProxy.java
@@ -42,8 +42,9 @@ public class TorTransProxy implements TorServiceConstants {
else
{
//use the bundled version
-
- ipTablesPath = new File(context.getDir("bin", 0),"iptables").getAbsolutePath();
+ File appLibsHome = new File(context.getApplicationInfo().nativeLibraryDir);
+ ipTablesPath = new File(appLibsHome,IPTABLES_BINARY_ASSET_KEY).getAbsolutePath();
+ ipTablesPath += " iptables"; //append subcommand since we are using xtables now
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits