3

How can I connect to vpn:

  • using pptp android
  • to a given hostname
  • with username and password?

I have checked a lot of tutorials a lot of examples and a lot of Github projects but still I got no answer.

I have tried a lot of VPN Apps like:

  • ToyVpn,
  • LightVpn,
  • Open Connect,
  • OpenVpn,
  • Vpn-Master,
  • Vpn-CLient

and still I didn't find a way how to do it. A lot of tutorials say that it can be done using StringBuilder (which builds a string with all the infos) and another tutorial says it can be done by the command:

connect(hostname,username,password) 

but it needs to be configured which I couldn't do. If is one of those two ways or is another answer?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • 1
    I have edited your question, but next time please try to make it clear and easy to read, most of the time nobody is answering the questions that are just a wall of text. – LazerBanana Aug 10 '17 at 10:13
  • Yeah sorry and Thanks ! –  Aug 10 '17 at 10:18
  • Read the answer in the link https://stackoverflow.com/a/30319628/1966247 – Muhammad Aug 10 '17 at 10:30
  • With the new VPNService of Android API level 14+ (Ice Cream Sandwich) it is possible to create a VPN service that does not need root access. This project is a port of OpenVPN. https://github.com/schwabe/ics-openvpn – Muhammad Aug 10 '17 at 10:34

1 Answers1

0

For configuring vpn on mobile there are many free vpn apps which provide open authentication. But in case of using your own vpn you need to authenticate by someones server.

Go to mobile settings, check the networks settings section you will find there some vpn like tab.

Go to add option and follow with the vpn server you want to authenticate over there.

Install a native vpn app which you want to use and check which vpn server is running on remote server. You will be asked for some username and password and, and yes you are done.

Joris Schellekens
  • 8,483
  • 2
  • 23
  • 54
  • i mean how to make it programmatically my bad i think i should mention that because i want to create my own vpn app –  Aug 10 '17 at 10:15