I'm trying to write an application that could connect to my VPN server with pptp protocol
, as i was researching I found out that with android.net.vpnservice
I could connect, but as I read some of documentation it was not clear how to connect to VPN (there were no API to set username or password, and also no API to set my VPN type(l2tp,pptp
); I also tested example application Google provided(toyvpn) and there were none of what I mentioned earlier there too.
Here is some code I found :
// Create a new interface using the builder and save the parameters.
mInterface = builder.setSession(mServerAddress)
.setConfigureIntent(mConfigureIntent)
.establish();
mParameters = parameters;
Hi this is a bit late but I have found something while searching.
I am also trying to build my own VPN tunnel / connection with using pptp and openvpn.
OpenVPN already has a solution.
PPTP am trying the solution below.
How to programmatically create a new VPN interface with Android 4.0?
link above was found at