use new bundled xtables binary appropriately

This commit is contained in:
Nathan Freitas 2013-12-28 09:21:25 -05:00
parent ca28aded12
commit e9396b7cc2
2 changed files with 8 additions and 2 deletions

View File

@ -87,5 +87,10 @@ public interface TorServiceConstants {
public static final String OBFSPROXY_ASSET_KEY = "libobfsproxy.so"; public static final String OBFSPROXY_ASSET_KEY = "libobfsproxy.so";
public static final int MESSAGE_TRAFFIC_COUNT = 5; public static final int MESSAGE_TRAFFIC_COUNT = 5;
//name of the iptables binary
public final static String IPTABLES_BINARY_ASSET_KEY = "libxtables.so";
} }

View File

@ -42,8 +42,9 @@ public class TorTransProxy implements TorServiceConstants {
else else
{ {
//use the bundled version //use the bundled version
File appLibsHome = new File(context.getApplicationInfo().nativeLibraryDir);
ipTablesPath = new File(context.getDir("bin", 0),"iptables").getAbsolutePath(); ipTablesPath = new File(appLibsHome,IPTABLES_BINARY_ASSET_KEY).getAbsolutePath();
ipTablesPath += " iptables"; //append subcommand since we are using xtables now
} }