enhanced getIp method, add support for HTTP_X_FORWARDED_FOR with multi ips, added test for getIp