[or-cvs] r14727: Fixing error with detecting IP address behind NAT (torstatus/trunk/web)
kasimir at seul.org
kasimir at seul.org
Sun May 25 06:13:51 UTC 2008
Author: kasimir
Date: 2008-05-25 02:13:51 -0400 (Sun, 25 May 2008)
New Revision: 14727
Modified:
torstatus/trunk/web/config_template.php
torstatus/trunk/web/index.php
Log:
Fixing error with detecting IP address behind NAT
Modified: torstatus/trunk/web/config_template.php
===================================================================
--- torstatus/trunk/web/config_template.php 2008-05-25 05:51:54 UTC (rev 14726)
+++ torstatus/trunk/web/config_template.php 2008-05-25 06:13:51 UTC (rev 14727)
@@ -28,6 +28,9 @@
$SSLUsingSquid = 0;
$AllowSSL = 0;
$SSLLink = "https://ssl.enabled.site.url/";
+// Uncomment the following if you are behind a NAT, but not
+// necessarily running Squid
+//$RealServerIP = "1.2.3.4";
// }}}
Modified: torstatus/trunk/web/index.php
===================================================================
--- torstatus/trunk/web/index.php 2008-05-25 05:51:54 UTC (rev 14726)
+++ torstatus/trunk/web/index.php 2008-05-25 06:13:51 UTC (rev 14727)
@@ -66,6 +66,10 @@
$ServerIP = $_SERVER['SERVER_ADDR'];
$RemoteIP = $_SERVER['REMOTE_ADDR'];
}
+if ($RealServerIP)
+{
+ $ServerIP = $RealServerIP;
+}
$ServerPort = $_SERVER['SERVER_PORT'];
$RemoteIPDBCount = null;
$PositiveMatch_IP = 0;
More information about the tor-commits
mailing list