From: Matteo Nastasi (mop) Date: Wed, 11 Feb 2015 08:57:19 +0000 (+0100) Subject: proxy management refactored X-Git-Tag: v4.18.5~1 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=c7ea164705798e0487508067997fb06420c9ef0c;p=brisk.git proxy management refactored --- diff --git a/web/Obj/proxyscan.phh b/web/Obj/proxyscan.phh deleted file mode 100644 index 0124db7..0000000 --- a/web/Obj/proxyscan.phh +++ /dev/null @@ -1,81 +0,0 @@ -"; - if ($resolved != $rblhost) { - return TRUE; - } - } - } - return FALSE; - } - - /** - * BOOL $proxy = detect( $addr ) - * Start detection and return TRUE if a proxy server is detected... - */ - function detect($addr){ - GLOBAL $G_proxy_white_list; - - foreach($G_proxy_white_list as $authproxy) { - if ($addr == $authproxy) - return (FALSE); - } - - if ($this->exists_in_rbl($addr) == TRUE) - return (TRUE); - - //nope, no proxy was logged... - return FALSE; - } -} - -//init class -function is_proxy($addr) -{ - $proxy = new proxy_detector(); - - //start detect - return ($proxy->detect($addr)); -} - -?> diff --git a/web/briskin5/index.php b/web/briskin5/index.php index ac0fb12..80bc798 100644 --- a/web/briskin5/index.php +++ b/web/briskin5/index.php @@ -27,7 +27,6 @@ $G_base = "../"; require_once("../Obj/brisk.phh"); -require_once("../Obj/proxyscan.phh"); require_once("Obj/briskin5.phh"); $mlang_bin5_index = array( 'aucwin' => array( 'it' => 'Hai vinto l\'asta.
Scegli il seme:', @@ -57,11 +56,6 @@ function bin5_index_main($transp_type, &$header_out, $addr, $get, $post, $cookie if (($sess = gpcs_var('sess', $get, $post, $cookie)) === FALSE) unset ($sess); - // Use of proxies isn't allowed. - // if (is_proxy()) { - // return (FALSE); - // } - // header('Content-type: text/html; charset="utf-8"',true); ?> diff --git a/web/briskin5/index_wr.php b/web/briskin5/index_wr.php index cb761bc..e0bd91e 100644 --- a/web/briskin5/index_wr.php +++ b/web/briskin5/index_wr.php @@ -26,15 +26,8 @@ $G_base = "../"; require_once("../Obj/brisk.phh"); -// require_once("../Obj/proxyscan.phh"); require_once("Obj/briskin5.phh"); -// Use of proxies isn't allowed. -// if (is_proxy()) { -// sleep(5); -// exit; -//} - /* * MAIN */ diff --git a/web/index.php b/web/index.php index e2d8f98..8f087d8 100644 --- a/web/index.php +++ b/web/index.php @@ -25,7 +25,6 @@ require_once("Obj/user.phh"); require_once("Obj/brisk.phh"); require_once("Obj/auth.phh"); -require_once("Obj/proxyscan.phh"); $mlang_room = array( 'userpassuse' => array('it' => 'Il tuo nickname è già in uso.', 'en' => 'Your nickname is already in use.'), @@ -338,11 +337,6 @@ function index_main(&$brisk, $transp_type, $header, &$header_out, $remote_addr_f $remote_addr = addrtoipv4($remote_addr_full); - // Use of proxies isn't allowed. - if (!$G_is_local && is_proxy($remote_addr)) { - return FALSE; - } - $is_login = FALSE; $body = ""; $tables = "";