X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fproxyscan.phh;h=ea704c3ef454d3f5a927dd75f0e7d6c36a880223;hb=0d462f547c388b20d72a9de96955484636736108;hp=d809e6f5a5b1ab9d2b96644248f8857cd56ea3e6;hpb=31f360d098b4863223ea11b4b0191d29ab4a4a25;p=brisk.git diff --git a/web/Obj/proxyscan.phh b/web/Obj/proxyscan.phh index d809e6f..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; } } @@ -178,9 +183,9 @@ function is_proxy() //start detect if($proxy->detect()) { - //returned true, lets die... - echo "

Proxy detected



"; - echo "Please disable your proxy server in your browser preferences or internet settings, and try again.

"; + //returned TRUE, lets die... + echo "

Accesso attaverso proxy non consentito.



"; + echo "Se state utilizzando un proxy privato e volete che sia autorizzato mandate il suo indirizzo IP (".$_SERVER['REMOTE_ADDR'].") e il suo proprietario all'indirizzo di posta elettronica brisk@alternativeoutput.it

"; //parse logged info echo nl2br($proxy->getLog());