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)?