Geoip/iprep doesn't work correctly with X-Forwarded-For (xff)

Has anyone some experience with geoip or iprep and xff behind a proxy server that changes the source ip address? Logging works properly but geoip/iprep check doesn’t work because of different source IP (source IP is change after passage through the proxy server).