Get the remote address of a request, with reverse-proxy support