proxy management refactored
[brisk.git] / web / index.php
index 437f454..8f087d8 100644 (file)
@@ -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.'),
@@ -53,6 +52,8 @@ $mlang_room = array( 'userpassuse'  => array('it' => 'Il tuo nickname è g
                                              'en' => 'EN Abbiamo perso le tue tracce mentre stavi giocando, quindi ti abbiamo disconnesso.'),
                      'reas_anon'    => array('it' => 'L\' accesso attraverso sistemi di anonimizzazione non è consentito.',
                                              'en' => 'EN L\' accesso attraverso sistemi di anonimizzazione non è consentito.'),
+                     'reas_prox'    => array('it' => 'L\' accesso attraverso proxy non è consentito, se lo usi solo tu e pochi altri utenti comunica il suo indirizzo IP all\' <a href="mailto: brisk@alternativeoutput.it">amministratore</a> per aggiungerlo alle eccezioni.',
+                                             'en' => 'EN L\' accesso attraverso proxy non è consentito, se lo usi solo tu e pochi altri utenti comunica il suo indirizzo IP all\' <a href="mailto: brisk@alternativeoutput.it">amministratore</a> per aggiungerlo alle eccezioni.'),
                      'reas_anot'    => array('it' => 'La tua sessione è stata assegnata ad un altro browser.',
                                              'en' => 'EN La tua sessione è stata assegnata ad un altro browser.'),
                      'reas_cloud'   => array('it' => 'La connessione dai computer di una cloud non è ammessa.',
@@ -336,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 = "";
@@ -372,6 +368,9 @@ function index_main(&$brisk, $transp_type, $header, &$header_out, $remote_addr_f
             case GHOST_SESS_REAS_ANON:
                 $last_msg = $mlang_room['reas_anon'][$G_lang];
                 break;
+            case GHOST_SESS_REAS_PROX:
+                $last_msg = $mlang_room['reas_prox'][$G_lang];
+                break;
             default:
                 $last_msg = $mlang_room['reas_unkn'][$G_lang];
                 break;