diff -Nur ./bin/settings.conf.orig ./bin/settings.conf
--- ./bin/settings.conf.orig	Mon Jan  1 21:46:11 2001
+++ ./bin/settings.conf	Tue Oct 23 17:26:35 2001
@@ -101,7 +101,7 @@
 # CheckNotifyMsg [OPTIONAL]
 # This message will be displayed to user, when it join to irc network
 
-CheckNotifyMsg "Vnimanie! Vashiat host shte bade proveren za open socks/wingate servers!Ako vidite opit za connect ot mashina etgate.csoft.bg tova e chast ot proverkata.Molja prochetete http://www.unibg.online.bg/proxyscan.php3 za poveche informacia!"
+CheckNotifyMsg "Vnimanie! Vashiat host shte bade proveren za open socks/http/wingate servers!Ako vidite opit za connect ot mashina etgate.csoft.bg tova e chast ot proverkata.Molja prochetete http://www.unibg.online.bg/proxyscan.php3 za poveche informacia!"
 
 # KillSocks [OPTIONAL]
 #
@@ -113,7 +113,7 @@
 #
 # This will be used for reason when killing user from socks server
 
-KillReason "You are using insecure SOCKS server, which may cause abuse to this network;Please, visit http://www.unibg.online.bg/proxyscan.php3 and recconect not using it!"
+KillReason "You are using insecure HTTP/SOCKS server, which may cause abuse to this network;Please, visit http://www.unibg.online.bg/proxyscan.php3 and recconect not using it!"
 
 # GlineSocks [OPTIONAL]
 #
diff -Nur ./include/config.h.orig ./include/config.h
--- ./include/config.h.orig	Mon Jan  1 21:46:11 2001
+++ ./include/config.h	Tue Oct 23 16:47:01 2001
@@ -105,4 +105,13 @@
 #undef         EXTREMEDEBUG
 /* full debug, also print info incoming from servers */
 #undef         DEBUGMODE2
+
+/* Check for HTTP Proxies, supporting CONNECT clause */
+#define		HTTP_CHECK
+
+/* Default server:port to try to connect to if HTTP_CHECK is defined */
+#ifdef	HTTP_CHECK
+#define	HTTP_TO_CONNECT	"av.com:80" 
+#endif
+
 #endif /* INCLUDED_config_h */
diff -Nur ./source/proxy.c.orig ./source/proxy.c
--- ./source/proxy.c.orig	Mon Jan  1 21:46:11 2001
+++ ./source/proxy.c	Tue Oct 30 09:30:13 2001
@@ -50,22 +50,45 @@
 Autogline the host (if required).
 */
 
+
+
+#ifdef HTTP_CHECK
+
+#define HTTP_PROXY	1
+#define SOCKS_PROXY	2
+
+	typedef struct {
+		u_int16_t	port;
+		u_int8_t	type;
+	} proxies_t;
+
+	static proxies_t chk_ports[] = {	{ 80, HTTP_PROXY },
+						{ 81, HTTP_PROXY },
+						{ 1080, SOCKS_PROXY },
+						{ 3128, HTTP_PROXY },
+						{ 8080, HTTP_PROXY },
+		/* if u want to add more port/proxy specifications, add'em here */
+						{ 0, 0 }	};
+
+#else
+
 #define SOCKSPORT 1080
 #define PROXYPORT   23
 
-typedef struct SocksReply {
-    unsigned char ver;
-    unsigned char method;
-  } SOCKS_REPLY;
+#endif
 
 void
 Proxy(struct Luser* user)
 
 {
   int sockfd, ret,bad;
-  SOCKS_REPLY  pSocksReply;
   struct Luser lptr;
-  
+  u_char rbuff[16]; /* Buffer to hold proxy's reply */
+
+#ifdef HTTP_CHECK
+	int cntr = -1;
+#endif
+
   iChecked++;
   iThreads++;
   bad = 0;
@@ -92,7 +115,14 @@
   if( CheckNotifyMsg )
     notice(CleanerName, lptr.nick,CheckNotifyMsg );
 
-  if ((sockfd = ConnectHost(lptr.hostname, SOCKSPORT)) >= 0)
+#ifdef HTTP_CHECK
+	while (chk_ports[++cntr].port) {
+		if (bad)
+			break;
+		if ((sockfd = ConnectHost(lptr.hostname, chk_ports[cntr].port)) >= 0)
+#else
+	if ((sockfd = ConnectHost(lptr.hostname, SOCKSPORT)) >= 0)
+#endif
   {
     /*
      * Connection successful, wait for write-ready
@@ -108,30 +138,49 @@
 
      if (!select(sockfd+1, NULL, &fds, NULL, &tv)) {
        close(sockfd);
+#ifdef HTTP_CHECK
+	continue;
+#else
        iThreads--;
 #ifndef PTH_EXIT
        return;  
 #else  
         pthread_exit();
 #endif
+#endif
      }
      soerrlen = sizeof(int);	
      getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &soerror, &soerrlen);
      if (soerror) {
        iThreads--;
        close(sockfd);
+#ifdef HTTP_CHECK
+	continue;
+#else
 #ifdef PTH_EXIT
        pthread_exit();
 #else
        return;
 #endif
+#endif
       }
 
       /*
        * Probe SOCKS5 server, 1 method, no authentication
        *      (SOCKS4 with bogus connect request)
+       *      
+       * If defined, does probes for HTTP CONNECT method
+       * 
        */
-      
+
+#ifdef HTTP_CHECK
+	if (chk_ports[cntr].type == HTTP_PROXY) {
+		char buff[256];
+		sprintf (buff, "CONNECT %s HTTP/1.0\n\n", HTTP_TO_CONNECT);
+		write (sockfd, buff, strlen (buff)); }
+	else
+#endif
+
       write(sockfd, "\x05\x01\x00", 3);
 
       FD_ZERO(&fds);        tv.tv_sec = 15;      /* 5 secs timeout */
@@ -139,60 +188,103 @@
 
       if (!select(sockfd+1, &fds, NULL, NULL, &tv)) {
        close(sockfd);
+#ifdef HTTP_CHECK
+	continue;
+#else
        iThreads--;
 #ifdef PTH_EXIT
        pthread_exit();
 #else
        return;
 #endif
+#endif
       }
 
-      memset(&pSocksReply, 0x00, sizeof(SOCKS_REPLY) );
-      if ((ret = read(sockfd, &pSocksReply, sizeof(SOCKS_REPLY))) < 0)
+      memset(rbuff, 0, 16 );
+      if ((ret = read(sockfd, rbuff, 16)) < 0)
            {
              putlog(LOG2,
+#ifdef HTTP_CHECK
+             "Proxy error from host %s: %s",
+#else
              "Socks error from host %s: %s",
+#endif
              lptr.hostname,
              strerror(errno));
              close(sockfd);
+#ifdef HTTP_CHECK
+	continue;
+#else
 #ifndef PTH_EXIT
              return;
 #else
              pthread_exit();
 #endif
+#endif
            }
 
 
+#ifdef HTTP_CHECK
+	if (chk_ports[cntr].type == HTTP_PROXY) {
+		if (!strncasecmp(rbuff, "HTTP/1.0 200", 12))
+			bad = 1;
+	}
+	else {
+#endif
            /*
             * An open SOCKS5 server will return zero for authentication method
             *         SOCKS4 server will return 91 for bogus request passed
             */
-       if (pSocksReply.ver == 5 && pSocksReply.method == 0) 
+       if (rbuff[0] == 5 && rbuff[1] == 0) 
             bad = 1;
-       if (pSocksReply.ver == 0 && pSocksReply.method == 91)
+       if (rbuff[0] == 0 && rbuff[1] == 91)
             bad = 1;
+
+#ifdef HTTP_CHECK
+	}
+#endif
+
       close (sockfd);
     } /* if host connected */
     else {
+#ifdef HTTP_CHECK
+	continue;
+#else
       iThreads--;
 #ifdef PTH_EXIT
       pthread_exit();
 #else
       return;
 #endif
-    }   
+#endif
+    }
+
+#ifdef HTTP_CHECK
+ } /* Cycling */
+#endif
 
    if( bad ) {
+   
+#ifdef HTTP_CHECK
+	if (chk_ports[--cntr].type == HTTP_PROXY)
+		putlog (LOG2,
+			"Insecure Wingate/Web Proxy: %s!%s@%s",
+			lptr.nick,
+			lptr.username,
+			lptr.hostname);
+	else
+#endif
+
       putlog(LOG2,
                "Insecure SOCKS: %s!%s@%s ver:%d method:%d KillSocks:%d GlineSocks:%d",
                lptr.nick,
                lptr.username,
                lptr.hostname,
-               pSocksReply.ver,
-               pSocksReply.method,
+               rbuff[0],
+               rbuff[1],
                KillSocks,
                GlineSocks);
-      ExecuteGline( &lptr, pSocksReply.ver, pSocksReply.method );
+      ExecuteGline( &lptr, rbuff[0], rbuff[1]);
    }
    iThreads--;
 #ifdef PTH_EXIT
@@ -260,6 +352,11 @@
               }
 #endif        
 	     if( EnableMonitoring ) {
+#ifdef HTTP_CHECK
+		if (type & code)
+			sprintf (inbuf, "Insecure HTTP/WinGate proxy on %s", lptr->hostname);
+		else
+#endif
         	 sprintf(inbuf,
               		"Insecure socks found on %s Version:%d Method:%d", 
                		lptr->hostname, type, code );
diff -Nur ./source/timestr.c.orig ./source/timestr.c
--- ./source/timestr.c	Mon Jan  1 21:46:11 2001
+++ ./source/timestr.c	Mon Oct 29 17:40:08 2001
@@ -11,6 +11,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <time.h>
 #include <sys/types.h>
 #include <sys/time.h>
 #include <string.h>
