Set up VPN programmatically on Android
Asked Answered
T

0

8

I need to implement VPN IPsec on android programmatically i.e. connecting, disconnecting on the click of button inside my own app, without asking user explicitly. Came across VpnService(https://developer.android.com/reference/android/net/VpnService.html) and its implementation i.e. toyvpn (https://android.googlesource.com/platform/development/+/master/samples/ToyVpn/src/com/example/android/toyvpn/)

Some of the threads already discussing the same:

But didn't find any satisfactory answer. What I inferred is, either I have to write whole implementation by myself. Or something about hidden API in Android.

Triplett answered 8/9, 2015 at 9:56 Comment(4)
Did you manage to solve it? I'm facing a similar scenario and wanted to know what you finally did. Thanks! :DSyncopate
Nope! My requirement changed. So i used openvpn: github.com/schwabe/ics-openvpnTriplett
@Syncopate did you find a solution for this? I am looking to open a L2TP connection programmaticallyDevisee
@JadChahine sorry, I can't help. Same as the original author, the requirement finally changed.Syncopate

© 2022 - 2024 — McMap. All rights reserved.