How do i get the Wide Area Network of my computer with Java? I try with this:
ServerSocket ss = new ServerSocket(port);
System.out.println(ss.getInetAddress().getHostAddress());
//wich return 0.0.0.0
then i try with this:
System.out.println(InetAddress.getLocalHost().toString());
//which return keenan-a658368c/192.168.1.100 < yes it is connected to router
like the function said, it return my local IP address
How do i get the WAN IP Address? such as 118.137.43.219