Version: 1.32, by Paul M
Developer Last Online: Nov 2023
Version: 3.0.x
Rating:
Released: 09-09-2004
Last Update: 05-28-2005
Installs: 161
No support by the author.
This modification is no longer available or supported.
A simple modification I did for our forum that was originally based on the Proxy Detector Hack (v3.0). Obviously, like all proxy server detection hacks, this will only work if the proxy server passes the appropiate http variables.
This hack makes the forum always use the members real ip when a proxy is detected, meaning that all existing ip functions continue to work, basically ignoring the proxy server (other than recording it's presence).
i.e.
* The real ip/host is displayed in who's online
* The real and proxy server ip's are accesible for each post, the button is red for members using a proxy.
* The real ip is searchable in the admin/mod cp, not the proxy ip.
* The real ip is bannable by admins (no moving to another proxy to avoid a ban).
etc etc.
The installation should take about 10-15 mins (4 file edits, 2 phrase changes, 1 new template, 1 sql query, 1 new image).
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
kinda having trouble beleaving it can resolve the users real IP, but we will see
As long as the proxy passes the client IP on in the standard http variables it will. Obviously it can't do anything about proxies that don't do this. I can't perform miracles.
Paul - I've installed your hack as per the instructions, but I'm getting IP addresses being saved by proxy users in the post table such as
192.168.1.7, 82.
172.26.106.249,
unknown, 10.255.
10.20.5.2, 194.2
I'm regarding this is quite a serious error as IP information needs to be correct.
PHP Code:
I've looked at the bit of code which I think gets the real IP in init.php :
// ####################### HN getproxyip START########################
// Establish Proxy Server IP address (if it exists) and Real IP Address
// Make sure forum always uses real client IP address
// Start of Paul Marsden Proxy Hack Modification
if ($_SERVER['HTTP_X_FORWARDED_FOR'] != '')
{
$proxyip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
else if ($_SERVER['HTTP_CLIENT_IP'] != '')
{
$proxyip = $_SERVER['HTTP_CLIENT_IP'];
}
else if ($_SERVER['HTTP_FORWARDED'] != '')
{
$proxyip = $_SERVER['HTTP_FORWARDED'];
}
else
{
$proxyip = '';
}
$proxyip = preg_replace('/javascript/i', 'java script', $proxyip);
$proxyip = str_replace('"', '"', $proxyip);
$proxyip = str_replace('<', '<', $proxyip);
$proxyip = str_replace('>', '>', $proxyip);
if (!preg_match("#\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}#", $proxyip))
{
$proxyip = '';
}
if ($proxyip == '')
{
define('PROXYIP', '');
define('IPADDRESS', $_SERVER['REMOTE_ADDR']);
}
else
{
define('PROXYIP', $_SERVER['REMOTE_ADDR']);
define('IPADDRESS', $proxyip);
}
unset($proxyip);
// End of Paul Marsden Proxy Hack Modification
// ####################### HN getproxyip END ########################