Getting the IP address of the current machine using Java

This way works well when there are multiple network interfaces. It always returns the preferred outbound IP. The destination 8.8.8.8 is not needed to be reachable. Connect on a UDP socket has the following effect: it sets the destination for Send/Recv, discards all packets from other addresses, and – which is what we use – transfers the socket … Read more

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 … Read more