get client IP method with trusted proxies