Create VPN on Android programmatically

jameshwart lopez picture jameshwart lopez · Aug 4, 2015 · Viewed 23k times · Source

I know this has been asked before, but most of them are 3 to 4 years ago with no definite answers. I would like to know if this is already possible as of 2015.

Answer

N0mi picture N0mi · Aug 17, 2015

Also there seems to API working for that in Android 22. VpnService and VpnService.Builder. Also you should check out this sample https://android.googlesource.com/platform/development/+/master/samples/ToyVpn/src/com/example/android/toyvpn/

Update: github.com/schwabe/ics-openvpn seems much better option when using openVPN profiles