[prev in list] [next in list] [prev in thread] [next in thread] 

List:       licq-cvs
Subject:    [Licq-cvs] licq/include
From:       Jon Keating <emostar () users ! sourceforge ! net>
Date:       2002-03-17 5:47:57
[Download RAW message or body]

Update of /cvsroot/licq/licq/include
In directory usw-pr-cvs1:/tmp/cvs-serv12924/include

Modified Files:
	Makefile.am licq_constants.h licq_icqd.h licq_socket.h 
Log Message:
Patch for HTTPS proxy support by Sergey Kononenko <sergk AT kiyavia.crimea.ua>
Needs testing!!!


Index: Makefile.am
===================================================================
RCS file: /cvsroot/licq/licq/include/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Makefile.am	29 Nov 2001 23:11:12 -0000	1.5
+++ Makefile.am	17 Mar 2002 05:47:55 -0000	1.6
@@ -2,7 +2,7 @@
 includedir = @includedir@/licq
 
 include_HEADERS = \
-  licq_buffer.h        licq_icq.h             \
+  licq_buffer.h        licq_icq.h            licq_proxy.h \
   licq_chat.h          licq_icqd.h           licq_sar.h \
   licq_constants.h     licq_languagecodes.h  licq_sighandler.h \
   licq_countrycodes.h  licq_log.h            licq_socket.h \

Index: licq_constants.h
===================================================================
RCS file: /cvsroot/licq/licq/include/licq_constants.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- licq_constants.h	29 Nov 2001 23:11:12 -0000	1.4
+++ licq_constants.h	17 Mar 2002 05:47:55 -0000	1.5
@@ -16,6 +16,7 @@
 extern char SHARE_DIR[];
 extern char LIB_DIR[];
 enum direction { D_SENDER, D_RECEIVER };
+const char DEFAULT_SERVER_HOST[]		   = "login.icq.com";
 
 // Plugin constants
 const char PLUGIN_SIGNAL                           = 'S';
@@ -25,12 +26,14 @@
 // Miscellaneous constants
 extern unsigned short DEBUG_LEVEL;
 const unsigned short MAX_FILENAME_LEN              = 255;
+const unsigned short MAX_HOSTNAME_LEN              = 255;
 const unsigned short MAX_CMD_LEN                   = 1024;
 const unsigned short MAX_DATA_LEN                  = 1024;
 const unsigned short MAX_MESSAGE_SIZE              = 450;
 const unsigned short TIME_NOW                      = 0;
 const unsigned short PING_FREQUENCY                = 60;
 const unsigned short DEFAULT_SERVER_PORT           = 5190;
+const unsigned short DEFAULT_SSL_PORT              = 443;
 const unsigned short MAX_SERVER_RETRIES            = 6;
 const unsigned short MAX_WAIT_ACK                  = 10;
 const unsigned short MAX_WAIT_PLUGIN               = 10;

Index: licq_icqd.h
===================================================================
RCS file: /cvsroot/licq/licq/include/licq_icqd.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- licq_icqd.h	14 Mar 2002 07:55:11 -0000	1.23
+++ licq_icqd.h	17 Mar 2002 05:47:55 -0000	1.24
@@ -27,6 +27,7 @@
 class TCPSocket;
 class SrvSocket;
 class INetSocket;
+class ProxyServer;
 
 const unsigned short IGNORE_MASSMSG    = 1;
 const unsigned short IGNORE_NEWUSERS   = 2;
@@ -220,16 +221,36 @@
 
   bool ViewUrl(const char *url);
 
+  // ICQ Server options
+  const char *ICQServer() {  return m_szICQServer;  }
+  void SetICQServer(const char *s) {  SetString(&m_szICQServer, s);  }
+  unsigned short ICQServerPort() {  return m_nICQServerPort;  }
+  void SetICQServerPort(unsigned short p) {  m_nICQServerPort = p; }
+  
   // Firewall options
   bool TCPEnabled();
   void SetTCPEnabled(bool b);
-  const char *FirewallHost()  { return m_szFirewallHost; }
-  void SetFirewallHost(const char *);
+
+  // Proxy options
+  void InitProxy();
+  bool ProxyEnabled() {  return m_bProxyEnabled;  }
+  void SetProxyEnabled(bool b) {  m_bProxyEnabled = b;  }
+  unsigned short ProxyType() {  return m_nProxyType;  }
+  void SetProxyType(unsigned short t) {  m_nProxyType = t;  }
+  const char *ProxyHost() {  return m_szProxyHost;  }
+  void SetProxyHost(const char *s) {  SetString(&m_szProxyHost, s);  }
+  unsigned short ProxyPort() {  return m_nProxyPort;  }
+  void SetProxyPort(unsigned short p) {  m_nProxyPort = p;  }
+  bool ProxyAuthEnabled() {  return m_bProxyAuthEnabled;  }
+  void SetProxyAuthEnabled(bool b) {  m_bProxyAuthEnabled = b;  }
+  const char *ProxyLogin() {  return m_szProxyLogin;  }
+  void SetProxyLogin(const char *s) {  SetString(&m_szProxyLogin, s);  }
+  const char *ProxyPasswd() {  return m_szProxyPasswd;  }
+  void SetProxyPasswd(const char *s) {  SetString(&m_szProxyPasswd, s);  }
+  
   unsigned short TCPPortsLow() { return m_nTCPPortsLow; }
   unsigned short TCPPortsHigh() { return m_nTCPPortsHigh; }
   void SetTCPPorts(unsigned short p, unsigned short r);
-  static bool SocksEnabled();
-  const char *SocksServer()  {  return getenv("SOCKS5_SERVER"); }
   static bool CryptoEnabled();
 
   const char *Terminal();
@@ -261,8 +282,7 @@
 
   char *m_szUrlViewer,
        *m_szTerminal,
-       *m_szRejectFile,
-       *m_szFirewallHost;
+       *m_szRejectFile;
   unsigned long m_nDesiredStatus,
                 m_nIgnoreTypes;
   unsigned short m_nTCPPortsLow,
@@ -280,7 +300,21 @@
        m_bOnlineNotifies,
        m_bAlwaysOnlineNotify;
   time_t m_tLogonTime;
-
+  
+  // ICQ Server
+  char *m_szICQServer;
+  unsigned short m_nICQServerPort;
+  
+  // Proxy
+  bool m_bProxyEnabled;
+  unsigned short m_nProxyType;
+  char *m_szProxyHost;
+  unsigned short m_nProxyPort;
+  bool m_bProxyAuthEnabled;
+  char *m_szProxyLogin;
+  char *m_szProxyPasswd;
+  ProxyServer *m_xProxy;
+  
   // Statistics
   void FlushStats();
   DaemonStatsList m_sStats;

Index: licq_socket.h
===================================================================
RCS file: /cvsroot/licq/licq/include/licq_socket.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- licq_socket.h	29 Nov 2001 23:11:12 -0000	1.12
+++ licq_socket.h	17 Mar 2002 05:47:55 -0000	1.13
@@ -15,6 +15,7 @@
 
 #include "pthread_rdwr.h"
 
+#include "licq_proxy.h"
 #include "licq_buffer.h"
 #include "licq_constants.h"
 
@@ -27,7 +28,8 @@
   SOCK_ERROR_errno,
   SOCK_ERROR_h_errno,
   SOCK_ERROR_desx,
-  SOCK_ERROR_internal
+  SOCK_ERROR_internal,
+  SOCK_ERROR_proxy
 } SocketError_et;
 
 
@@ -59,6 +61,8 @@
   bool SetRemoteAddr(unsigned long _nRemoteIp, unsigned short _nRemotePort);
   bool SetRemoteAddr(const char *_szRemoteName, unsigned short _nRemotePort);
 
+  void SetProxy(ProxyServer *_xProxy) { m_xProxy = _xProxy; };
+  
   void ResetSocket();
   void ClearRecvBuffer()  { m_xRecvBuffer.Clear(); };
   bool RecvBufferFull()   { return m_xRecvBuffer.Full(); };
@@ -86,12 +90,14 @@
 
   int m_nDescriptor;
   struct sockaddr_in m_sRemoteAddr, m_sLocalAddr;
+  char *m_szRemoteName;
   CBuffer m_xRecvBuffer;
   char m_szID[4];
   int m_nSockType;
   unsigned long m_nOwner;
   unsigned short m_nVersion;
   SocketError_et m_nErrorType;
+  ProxyServer *m_xProxy;
 };
 
 


_______________________________________________
Licq-cvs mailing list
Licq-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/licq-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic