You can't know it on the client because the client doesn't know it. For example, if the client is behind a NAT, the IP of the machine will be different from the IP the "world" sees.
Make a simple server (AJAX) call that will return you the remote address.