ensure all iptables rules are always wiped
and reapply rules settings if modifed after settings menu accessed
This commit is contained in:
parent
3d67ce58bb
commit
b35a239e44
|
@ -815,8 +815,14 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (torStatus == TorServiceConstants.STATUS_ON)
|
||||
{
|
||||
try {
|
||||
mService.processSettings();
|
||||
} catch (RemoteException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
Toast.makeText(this, R.string.you_may_need_to_stop_and_start_orbot_for_settings_change_to_be_enabled_, Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
|
|
|
@ -897,15 +897,11 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
|||
|
||||
if (mTransProxy == null)
|
||||
mTransProxy = new TorTransProxy(this, fileXtables);
|
||||
|
||||
if (mTransProxyAll)
|
||||
mTransProxy.setTransparentProxyingAll(this, false);
|
||||
else
|
||||
{
|
||||
ArrayList<TorifiedApp> apps = AppManager.getApps(this, TorServiceUtils.getSharedPrefs(getApplicationContext()));
|
||||
mTransProxy.setTransparentProxyingByApp(this, apps, false);
|
||||
}
|
||||
|
||||
|
||||
mTransProxy.setTransparentProxyingAll(this, false);
|
||||
ArrayList<TorifiedApp> apps = AppManager.getApps(this, TorServiceUtils.getSharedPrefs(getApplicationContext()));
|
||||
mTransProxy.setTransparentProxyingByApp(this, apps, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1730,7 +1726,31 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
|||
|
||||
public void processSettings ()
|
||||
{
|
||||
/*
|
||||
|
||||
try {
|
||||
|
||||
boolean hadEnableTransparentProxy = mEnableTransparentProxy;
|
||||
|
||||
updateSettings ();
|
||||
|
||||
if (mHasRoot)
|
||||
{
|
||||
if (hadEnableTransparentProxy)
|
||||
disableTransparentProxy();
|
||||
|
||||
if (mEnableTransparentProxy)
|
||||
{
|
||||
disableTransparentProxy();
|
||||
enableTransparentProxy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Thread thread = new Thread()
|
||||
{
|
||||
|
||||
|
@ -1750,7 +1770,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
|||
};
|
||||
|
||||
thread.start();
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue