I am looking to implement a feature to open a L2TP/IPSEC connection from the android application so I can simply pass the server ip, pre-shared key, username and password and so the device is connected to this VPN server.
Note that this could be implemented simply in any android device by Opening Settings -> Wireless & Networks -> VPN -> Add VPN Network -> choose vpn cnx type, ip, shared secret, username, password -> the vpn connection will be opened and the mobile will take a public ip matching the server ip address and so on.. I need to implement exactly this but from the code so the user will click on a button and all this work will be done in the background..
I looked here [login to view URL] that we need to extend and build our own VPN solutions to do that.
Is there any available solutions for that so we can use it instead of reinventing the wheel?
The below solution ToyVpn is suggested by android here [login to view URL]
But it's not working for me as I don't see in the code a logic that takes those params (ip address, shared secret, username and password) and open this vpn connection