remove ad hoc Mikrotik exception
[curl-de-sac.git] / web / Obj / curl-de-brisk.phh
index 3c6696b..c92b0a0 100755 (executable)
@@ -165,47 +165,34 @@ class Proxy_chk_cmd_cls extends CDS_cmd_cls {
         parent::__construct("proxy_chk", 10);
 
         $this->scan_headers = array(
-                                    'HTTP_VIA',
-                                    'HTTP_X_FORWARDED_FOR',
-                                    'HTTP_FORWARDED_FOR',
-                                    'HTTP_X_FORWARDED',
-                                    'HTTP_FORWARDED',
-                                    'HTTP_CLIENT_IP',
-                                    'HTTP_FORWARDED_FOR_IP',
-                                    'VIA',
-                                    'X_FORWARDED_FOR',
-                                    'FORWARDED_FOR',
-                                    'X_FORWARDED',
-                                    'FORWARDED',
-                                    'CLIENT_IP',
-                                    'FORWARDED_FOR_IP',
-                                    'HTTP_PROXY_CONNECTION'
+                                    'Http-Via',
+                                    'Http-X-Forwarded-For',
+                                    'Http-Forwarded-For',
+                                    'Http-X-Forwarded',
+                                    'Http-Forwarded',
+                                    'Http-Client-Ip',
+                                    'Http-Forwarded-For-Ip',
+                                    'Via',
+                                    'X-Forwarded-For',
+                                    'Forwarded-For',
+                                    'X-Forwarded',
+                                    'Forwarded',
+                                    'Client-Ip',
+                                    'Forwarded-For-Ip',
+                                    'Http-Proxy-Connection'
                                     );
     }
 
     function create($cds, $ctx, $user_idx, $user_sess, $conn_ip, $is_auth, $headers)
     {
         if ($cds->dbg_get() > 0) {
-            printf("'proxy_chk'::create url:[%s]\n", 'PROXY_CHK_URL');
+            fprintf(STDERR, "'proxy_chk'::create url:[%s]\n", 'PROXY_CHK_URL');
         }
 
         foreach($this->scan_headers as $key){
             //proxy detected? lets log...
             if(array_key_exists($key, $headers)) {
                 // we already are behind a PROXY, this are our headers
-                if ($key == 'X-Proxy-ID') {
-                    if ($headers[$key] == '860705422')
-                        continue;
-                }
-                else if ($key == 'X-Forwarded-For') {
-                    if ($headers[$key] == '172.16.9.66')
-                        continue;
-                }
-                else if ($key == 'Via') {
-                    if ($headers[$key] == '1.1 172.16.8.1 (Mikrotik HttpProxy)')
-                        continue;
-                }
-
                 proxy_chk_postprocess($ctx, $user_idx, $user_sess, $conn_ip, $is_auth, TRUE);
                 return TRUE;
             }