<!-- $Id: Proxy-to-real-ip.txt 873 2012-05-24 01:03:17Z  $ -->


=========================================================
Paul Marsden Proxy IP Hack Modification for vBulletin 4.2
=========================================================


This makes your forum use the real ip address if a proxy server is detected, the proxy ip is recorded in an extra field.
This allows all vBulletin ip based functions, such as ip searching, who's online and ip banning to work correctly using the real ip.

Please note that proxy servers can ONLY be detected in they pass on the correct http headers.
Not all proxy servers do this, especially annonymous proxy servers since they would not be annonymous if they did.

vBulletin currently uses two global variables IPADDRESS and ALT_IP, this modification adds a third called PROXYIP.

If no proxy is detected then PROXYIP is set to blank.
If a proxy server is detected then IPADDRESS is set to the real ip, and PROXYIP (and ALT_IP) are set to the proxy ip.


Step 1.

In class_core.php ;

Find ;

		if ($proxy)
		{
			define('ALT_IP', $this->ipaddress);
			define('IPADDRESS', $this->alt_ip);
		}


Insert above it ;

		// Detect ALL.
		if ($registry->ipaddress == $registry->alt_ip)
		{
			define('PROXYIP',''); 
		}
		else
		{
			$proxy = true;
			define('PROXYIP',$registry->ipaddress);
		}



Step 2.

Upload the ip-40x.png to your /images/buttons/ folder.



Step 3.

Import the modification as a product using the supplied XML file.


