fix usage of system iptables

This commit is contained in:
Unpublished 2016-06-24 00:49:34 +02:00
parent 40233543d3
commit 639bc3241e
1 changed files with 10 additions and 17 deletions

View File

@ -80,28 +80,21 @@ public class TorTransProxy implements TorServiceConstants {
private String findSystemIPTables () private String findSystemIPTables ()
{ {
if (mSysIptables != null)
{ //if the user wants us to use the built-in iptables, then we have to find it
return mSysIptables; File fileIpt = new File("/system/xbin/iptables");
}
if (fileIpt.exists())
mSysIptables = fileIpt.getAbsolutePath();
else else
{ {
//if the user wants us to use the built-in iptables, then we have to find it fileIpt = new File("/system/bin/iptables");
File fileIpt = new File("/system/xbin/iptables");
if (fileIpt.exists()) if (fileIpt.exists())
mSysIptables = fileIpt.getAbsolutePath(); mSysIptables = fileIpt.getAbsolutePath();
else
{
fileIpt = new File("/system/bin/iptables");
if (fileIpt.exists())
mSysIptables = fileIpt.getAbsolutePath();
}
} }
return mSysIptables; return mSysIptables;
} }