public String getRemoteAddr() {
        if (remoteAddrHeader != null) {
            String val = getHeader(remoteAddrHeader);
            if (val != null) return val;
        }
        SocketAddress addr = getRemoteAddress();
        if (addr == null) return "";
        if (addr instanceof InetSocketAddress) return ((InetSocketAddress) addr).getAddress().getHostAddress();
        return String.valueOf(addr);
    }
public String getRemoteAddr ( ) { if ( remoteAddrHeader != null ) { String val = getHeader ( remoteAddrHeader ) ; if ( val != null ) return val ; } SocketAddress addr = getRemoteAddress ( ) ; if ( addr == null ) return "" ; if ( addr instanceof InetSocketAddress ) return ( ( InetSocketAddress ) addr ) . getAddress ( ) . getHostAddress ( ) ; return String . valueOf ( addr ) ; }
获取客户端地址IP, 与getRemoteAddress() 的区别在于：本方法优先取header中指定为RemoteAddress名的值，没有则返回getRemoteAddress()的getHostAddress()。<br>
本方法适用于服务前端有如nginx的代理服务器进行中转，通过 getRemoteAddress()是获取不到客户端的真实IP。

@return 地址