Manual:$wgSquidServers

Details
If you want to have appropriate IP addresses in your MediaWiki backend server that’s served by your proxy, this setting is essential.

You should also make sure that your proxy server (Varnish, NGINX, Squid) is sending a  HTTP header.

A list of proxy servers (IPs if possible) to purge on changes. Don't specify ports here (80 is default). eg:

Any IPs listed in this array will be treated as trusted surrogates (reverse proxies). IP addresses displayed for users connected via these Squid servers therefore will match individual user IP's, not the Squid's IP.

''Note: In versions prior to 1.4.0 this setting was not defined in DefaultSettings.php (although its usage was commented there). This may have been because it wasn't implemented properly or may simply have been an oversight.''

Format
Each entry can for both IPv6/IPv4 addresses, supports CIDR and other notations.

The following entries should be valid:

Anything described in includes/utils/IP.php should be valid.