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.

Android Learner
  • 2,559
  • 6
  • 34
  • 43
  • 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 01 '13 at 15:35

1 Answers1

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.

plaisthos
  • 6,255
  • 6
  • 35
  • 63
  • 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 . –  Nov 05 '17 at 09:23
  • Theorectially possible sure. You just have to implement L2TP yourself or port an existing l2tp implementation. – plaisthos Dec 03 '17 at 15:07
  • Can you mention which API are you talking about? – Noman Aziz Jul 06 '21 at 05:46