How to create PPTP connection with Java?

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());

Leave a Comment