1

I need to check what accounts from my huge list are still valid on VPN-server, but I haven't found any information on how to do it with Java language. How do I connect to PPTP-server using Java?

I created a socket with the server ip and PPTP-port, just like this, according to PPTP working over TCP:

    Socket pptpSocket = new Socket("51.15.151.165", 1723);
    PrintWriter out = new PrintWriter(pptpSocket.getOutputStream(), true);
    BufferedReader in = new BufferedReader(new InputStreamReader(pptpSocket.getInputStream()));

    System.out.println(in.readLine());

It connects well, but answers me nothing and I don't really know how to send my credentials on this socket properly, so I'll get a PPTP tunnel. Maybe I'm doing it wrong, but what is the right way? How can I establish the connection I want?

Silvan
  • 23
  • 6
  • 1
    (Disregarding the fact, that PPTP is considered "dead" and "non-secure" nowadays: google) You would have to send one/a sequence of the ["defined protocol message"](https://learn.microsoft.com/en-us/previous-versions//cc768084(v=technet.10)#pptp-control-connection) ... analogies from an (e.g.) "HTTP" Socket client will be helpful. – xerx593 Feb 05 '19 at 12:16

0 Answers0