code: public InetAddress getLocalAddress(){
        if(localIP == null){
  	 try{
  	    localIP = InetAddress.getByName(localHost);
  	 }catch(UnknownHostException e){
  	   return null;
  	 }
        }
        return localIP;
     }
docs: Get address assigned by proxy to make a remote connection,
  it might be different from the host specified for the proxy.
  Can return null if socks server returned this address as hostname
  and it can't be resolved locally, use getLocalHost() then.
  @return Address proxy is using to make a connection.