fix the ability to select per app VPN routing
This commit is contained in:
parent
f41d46960c
commit
39244a613a
|
@ -809,7 +809,7 @@ public class OrbotMainActivity extends Activity
|
|||
else if (torStatus == TorServiceConstants.STATUS_ON)
|
||||
{
|
||||
updateTransProxy();
|
||||
Toast.makeText(this, R.string.you_may_need_to_stop_and_start_orbot_for_settings_change_to_be_enabled_, Toast.LENGTH_SHORT).show();
|
||||
// Toast.makeText(this, R.string.you_may_need_to_stop_and_start_orbot_for_settings_change_to_be_enabled_, Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -300,6 +300,7 @@ public class AppManager extends Activity implements OnCheckedChangeListener, OnC
|
|||
app.setUid(aInfo.uid);
|
||||
app.setUsername(pMgr.getNameForUid(app.getUid()));
|
||||
app.setProcname(aInfo.processName);
|
||||
app.setPackageName(aInfo.packageName);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@ public class TorifiedApp implements Comparable {
|
|||
private String procname;
|
||||
private String name;
|
||||
private Drawable icon;
|
||||
private String packageName;
|
||||
|
||||
private boolean torified = false;
|
||||
private boolean usesInternet = false;
|
||||
|
@ -127,4 +128,12 @@ public class TorifiedApp implements Comparable {
|
|||
{
|
||||
return getName();
|
||||
}
|
||||
|
||||
|
||||
public String getPackageName() {
|
||||
return packageName;
|
||||
}
|
||||
public void setPackageName(String packageName) {
|
||||
this.packageName = packageName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -343,9 +343,9 @@ public class OrbotVpnService extends VpnService implements Handler.Callback {
|
|||
|
||||
for (TorifiedApp app : apps)
|
||||
{
|
||||
if (app.isTorified())
|
||||
if (app.isTorified() && (!app.getPackageName().equals(getPackageName())))
|
||||
{
|
||||
builder.addAllowedApplication(app.getUsername());
|
||||
builder.addAllowedApplication(app.getPackageName());
|
||||
perAppEnabled = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue