Version: 4.2.0.1, by Paul M
Developer Last Online: Nov 2023
Category: Administrative and Maintenance Tools -
Version: 4.2.x
Rating:
Released: 01-01-2010
Last Update: 01-03-2015
Installs: 686
DB Changes Uses Plugins Auto-Templates
Code Changes Translations
No support by the author.
--------------------------------------------------------------------------------
This modification has been withdrawn.
vBulletin 4.0.x and 4.1.x are no longer supported.
For vBulletin 4.2.x please use the built in reverse proxy detection.
--------------------------------------------------------------------------------
This hack makes the forum always use the members real ip if a proxy is detected, meaning that all existing ip functions should continue to work, basically ignoring the proxy server (other than recording it's presence).
For example ;
* The real ip is displayed in the who's online page.
* The real and proxy server ip's are accesible for each post, the button is red for members using a proxy server.
* The real ip is searchable in the admin/mod cp (but not the proxy ip).
* The real ip can be banned by admins.
Note: This hack relies on the proxy server passing the correct http variables to allow detection.
If they are not passed then detection will not work. By definition, annonymous proxies do not pass on these variables.
If a proxy is detected, then a red ip icon is displayed instead of the standard one.
To install, download and unzip the files and follow the instructions in the text file.
This modification involves changes to the class_core.php file - if you upgrade your vbulletin, you must reapply those changes.
If you forget these edits, the modification will continue to work for forum posts only (v4.0.4 +).
History:
v4.0.1 : 02-Jan-2010 : Initial release for vb 4.0.0 Gold. v4.0.2 : 04-Jan-2010 : Added check for invalid alt ip address. v4.0.3 : 13-Jan-2010 : Minor change to cope better when people forget the class_core file edits. v4.0.4 : 15-Jan-2010 : Further changes to process forum posts when people forget the class_core file edits. v4.0.5 : 20-Feb-2010 : Internal update, not released. v4.0.6 : 27-Feb-2010 : Style code updates for vB 4.0.2. v4.0.7 : 30-Oct-2010 : Style code updated to work when css stored as files.
v4.1.0 : 04-Dec-2010 : Updated for vBulletin 4.1.x
v4.1.7.0 : 16-Oct-2011 : Updated for vBulletin 4.1.7. v4.1.8.0 : 18-Nov-2011 : Updated for vBulletin 4.1.8.
v4.2.0.0 : 24-May-2012 : Updated for vBulletin 4.2.0. v4.2.0.1 : 02-Jan-2015 : Updated for Cloudflare Changes.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
If you are installing 4.2.0.0 version, you need to add below step 1 (from 4.1.0.8) in addition to step 2 (from 4.2.0.0).
-----------------------------------------------------------------------------------------------------------
Step 1 (THIS STEP IS NOT REQUIRED IN vBulletin 4.1.7 - IT *IS* REQUIRED IN ALL OTHER VERSIONS, INCLUDING 4.1.8 ONWARDS).
In class_core.php ;
Find ;
// fetch client IP address
$registry->ipaddress = $this->fetch_ip();
define('IPADDRESS', $registry->ipaddress);
// attempt to fetch IP address from behind proxies - useful, but don't rely on it...
$registry->alt_ip = $this->fetch_alt_ip();
define('ALT_IP', $registry->alt_ip);
Replace with ;
// Paul M - Get ip addresses.
$registry->ipaddress = $this->fetch_ip();
$registry->alt_ip = $this->fetch_alt_ip();
// Check that alt_ip is valid address, reset to original if not.
if (preg_match("#\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}#" , $registry->alt_ip, $iplist))
{
$registry->alt_ip = $iplist[0];
}
else
{
$registry->alt_ip = $registry->ipaddress;
}
// Set ip constants.
if ($registry->ipaddress == $registry->alt_ip)
{
define('PROXYIP','');
define('ALT_IP',$registry->alt_ip);
define('IPADDRESS',$registry->ipaddress);
}
else
{
define('ALT_IP',$registry->alt_ip);
define('IPADDRESS',$registry->alt_ip);
define('PROXYIP',$registry->ipaddress);
$registry->ipaddress = $registry->alt_ip;
}
This mod does not work. I'm attempting to use it with Cloudflare (at Cloudflare's recommendation), and I'm still only seeing Cloudflare IP addresses within vBulletin.
This mod does not work. I'm attempting to use it with Cloudflare (at Cloudflare's recommendation), and I'm still only seeing Cloudflare IP addresses within vBulletin.
This mod does not work. I'm attempting to use it with Cloudflare (at Cloudflare's recommendation), and I'm still only seeing Cloudflare IP addresses within vBulletin.
The mod works just fine, please do try and get your facts straight before making sweeping statements
It will no longer work with Cloudfare because they changed their system to use a custom http variable called HTTP_CF_CONNECTING_IP, instead of the standard HTTP_X_FORWARDED_FOR.
Thanks for clarifying the situation, Paul. Cloudflare needs to stop directing people to this mod, because they are causing a lot of unnecessary confusion.
Thanks for clarifying the situation, Paul. Cloudflare needs to stop directing people to this mod, because they are causing a lot of unnecessary confusion.
I wasnt aware they were, but its easy enough to modify it to work with them.
In addition to the install instructions provided, just do this ;
Code:
In class_core.php ;
Find ;
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$altip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
Replace with ;
if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
{
$altip = $_SERVER['HTTP_CF_CONNECTING_IP'];
}
else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$altip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
No need to perform their option 2 then.
I've included this in the instructions for v4.2.0.1