2

I'm trying to exclude certain apps from using the VPN connection that is created on android so that those apps make a direct/proxy connection rather than through the VPN server. I use OpenVPN for Android (supports IP exclusions) and proxydroid (a proxy wrapper/proxifier app).

When I looked up, it says most of the VPNs supports an IP/CIDR/domain based routing rather than application specific routing. And also certain apps can be forced through VPN by using a virtual machine(running VPN inside VM) based solution while the rest of apps make a direct connection. But I am not looking for a virtual machine based solution. I also found two other methods to force only certain apps through the VPN:

Method 1) Configure and use a proxy at the other end of the VPN connection. Configure the client-side applications to use the proxy.

Method 2) Add another local IP to your network interface and bind all applications that need to be sent strictly through the VPN to this interface. On Linux, the use of the 'ip route' and 'ip rule' commands will allow you to define additional non-default routing tables and map to them based on the source address.

How do I use these methods on Android? I am thinking of binding a particular app to a particular IP and port using proxydroid and then use the force binding method. How do I use this force binding method on Android?

If it's not possible through that method, is there any other method (such as split tunneling)?

2
  • Not possible with AOSP VPN settings. Can be accomplished with certain 3rd party apps.
    – iBug
    Commented Jan 23, 2017 at 6:01
  • I was trying to exclude 'orbot' from using VPN but it seems that is not working. Other apps like Chrome is allowing it to be excluded from the VPN by connecting to a proxy server. Commented Jan 23, 2017 at 9:22

1 Answer 1

3

Solution:

  1. Run proxydroid app and selected the apps to be routed through the proxy server. Specify the host, port and proxy type of the proxy server under proxy settings.

  2. Exclude the IP of the proxy server used in the VPN app. You can use 'OpenVPN for Android' app. Go to the settings for the VPN server and add IPs to be excluded in CIDR format (under the 'routing' tab)

  3. Connect to VPN and then enable proxydroid.

This will allow apps to use a proxy and excludes them from using VPN connection.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .