14

I have read about VpnService and VpnService.Builder but could not get any method to set vpn type to PPTP or L2TP, even I didn't get any method where I can set user/ password.

Note: There are many questions in SO I read them but didn't find solution. I looked into ToyVpn application but this there are only 3 parameters we set in this application.

Please help. If there is 3party API, please give the reference.

1
  • You need to implement the PPTP protocol yourself. I myself is currently looking into this as I have a working VPN/PPTP connection working for 2.x and want it working for 4.x as well. Try looking at the source code for Hideman - they are doing it :)
    – slott
    Jul 1, 2013 at 15:35

1 Answer 1

7

Yes and all answers in stackoverflow should have told you that VPNService API is for creating your own VPN application with its own VPN stack (which could happen to be PPTP/LT2P/ToyVPN/OpenVPN/MyOwnVerySecure VPN protocol) and not to configure the system VPN.

An API to configure the System VPNs is simple not included in the SDK.

3
  • can u explain it more what do u mean by [ with its own VPN stack (which could happen to be PPTP/LT2P/ToyVPN/OpenVPN/MyOwnVerySecure VPN protocol) ] , since I didn't get it well , is it possible to create an L2TP VPN for Android or not if yes please share some useful resources .
    – user6689631
    Nov 5, 2017 at 9:23
  • Theorectially possible sure. You just have to implement L2TP yourself or port an existing l2tp implementation.
    – plaisthos
    Dec 3, 2017 at 15:07
  • Can you mention which API are you talking about?
    – Noman Aziz
    Jul 6, 2021 at 5:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.