I'm developing an Android application and want it to connect to an OpenVPN Server. Since Android 4.0 there is a VPNService class. This class however needs to intercept all the network packets(and require special permissions) because it is apperently running on the Internet Protocol. However as far as I understand, OpenVPN is running on-top of TCP or UDP(my server is configured to use UDP). I only need to tunnel the traffic from my own application through the VPN tunnel.
- Shouldn't it theoretically be possible to avoid this(because I don't need to intercept all the traffic, but only the UDP-OpenVPN packets targeting my application)?
- Do you know of a library for Android that fulfills my needs?
- If not, would it be possible to implement the OpenVPN protocol in Android on-top of UDP without the need of the VPNService class?
I found the follwing project: ics-openvpn. However it also uses the VPNService class and intercepts all the packages.