Add option for allowing reverse proxies.
Check for allowed reverse proxies.

This incorporates the configuration option allowed_proxy_from. It will take a list of hosts or CIDR ranges. If the setting contains anything and the connecting host is inside one of those ranges, allow the connection as if the contents of 'X-Forwarded-For' header were the actual host, otherwise just pass it through as if nothing happened.