X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2FObj%2Fproxyscan.phh;h=ea704c3ef454d3f5a927dd75f0e7d6c36a880223;hb=b1c3c706db9bfa6b95428b9e84c1d13b6203ecf6;hp=1e9376b08cda97822f6540c619ec49f5c9511483;hpb=3ad972807dfceca464574e0ce7cfc1ffe1e70013;p=brisk.git
diff --git a/web/Obj/proxyscan.phh b/web/Obj/proxyscan.phh
index 1e9376b..ea704c3 100644
--- a/web/Obj/proxyscan.phh
+++ b/web/Obj/proxyscan.phh
@@ -69,11 +69,11 @@ class proxy_detector {
$resolved = gethostbyname($rblhost);
// echo "RBL ".$rblhost."
";
if ($resolved != $rblhost) {
- return true;
+ return TRUE;
}
}
}
- return false;
+ return FALSE;
}
/**
@@ -126,21 +126,26 @@ class proxy_detector {
/**
* BOOL $proxy = detect( VOID )
- * Start detection and return true if a proxy server is detected...
+ * Start detection and return TRUE if a proxy server is detected...
*/
function detect(){
+ GLOBAL $G_proxy_white_list;
$log = "";
+ foreach($G_proxy_white_list as $authproxy) {
+ if ($_SERVER['REMOTE_ADDR'] == $authproxy)
+ return (FALSE);
+ }
if ($this->exists_in_rbl($_SERVER['REMOTE_ADDR']) == TRUE)
return (TRUE);
- //scan all headers
- foreach($this->scan_headers as $i){
- //proxy detected? lets log...
- if($_SERVER[$i])
- $log.= "trigger $i: ".$_SERVER[$i]."\n";
- }
+// //scan all headers
+// foreach($this->scan_headers as $i){
+// //proxy detected? lets log...
+// if($_SERVER[$i])
+// $log.= "trigger $i: ".$_SERVER[$i]."\n";
+// }
//let's do something...
if($log){
@@ -163,11 +168,11 @@ class proxy_detector {
}
//done
- return true;
+ return TRUE;
}
//nope, no proxy was logged...
- return false;
+ return FALSE;
}
}
@@ -177,10 +182,10 @@ function is_proxy()
$proxy = new proxy_detector();
//start detect
- if(!$proxy->detect()) {
- //returned true, lets die...
- echo "