protected function getTrustedForwardedIp(array $ips)
    {
        if (is_string($this->trustedProxy)) {
            foreach ($ips as $ip) {
                if (\Jasny\ip_in_cidr($ip, $this->trustedProxy)) {
                    continue;
                }
                return $ip;
            }
        }
        
        return end($ips);
    }