www.pudn.com > proxy.zip > WorkingThread.h


/* 
*	File name:		WorkingThread.h 
*	Version:		1.0.0.1 
*	Programmer:		A.George 
*	Organization:	 
*	Date(start):	5.23.2000 
*	Date(finish):	 
*	Description: 
					Working thread header file 
*/ 
#ifndef _WORKING_THREAD_AG_INCLUDED_ 
#define _WORKING_THREAD_AG_INCLUDED_ 
 
#include  
 
// macros for constant definition 
#define AGM_OUTPUT				0x500 
#define REQUEST_UNAUTHORIZED	1 
#define VIRTUAL_RESOURCE		2 
#define PARTIAL_CONTENT			4 
#define BUFFER_SIZE				2048 
 
// string constant 
#define STRCONTENT	"\ 
\ 
\ 
Connection limit exceeded\ 
\ 
\ 

Connection limit exceeded

\ Please change to another proxy server or wait for decreasing of connections number.

\

Proxy server at %d.%d.%d.%d:%d ag
\ \ \ " #define STR407 "\ \ \ Proxy authorization required\ \ \

Proxy authorization required

\ Username authentication is required for using this proxy.\ Either your browser does not perform proxy authorization, or your\ authorization has failed.

\

Proxy server at %d.%d.%d.%d:%d ag
\ \ \ " #define VIRTUAL_MAIN_PAGE "\ \ Ag Virtual Home Page\ \ \

Personal Proxy

by Ag

\ This is Virtual Page of site www.PersonalProxy.com

\ \ " // structures typedef struct tagTHREADPARAM{ char pszUrl[512]; BYTE b1; BYTE b2; BYTE b3; BYTE b4; int nPort; char pszUser[16]; char pszPasswd[16]; }THREADPARAM; //typedef struct tagLISTENPARAM{ // int nPortProxy; //}LISTENPARAM; typedef struct tagWORKPARAM{ SOCKET sckClient; sockaddr_in addr; }WORKPARAM; typedef struct tagHTTPHEADER{ DWORD dwHttpStatus; int nVerMajor; int nVerMinor; char pszStatus[256]; char pszType[256]; char pszLocation[256]; DWORD dwContSize; char * pContBegin; }HTTPHEADER; typedef struct tagREQUESTHEADER{ DWORD dwFlag; char* pszAuthBegin; char* pszAuthEnd; char* pszVirtualRes; char pszUrl[512]; char pszUserPass[16]; char* pszContBegin; DWORD dwRange; DWORD dwContSize; }REQUESTHEADER; typedef struct tagGLOBAL{ HWND hWnd; BYTE b1; BYTE b2; BYTE b3; BYTE b4; int nPort2nd; char pszUser[64]; char pszPasswd[64]; BYTE _b1; BYTE _b2; BYTE _b3; BYTE _b4; int nPort; // local }GLOBAL; // global variables extern int g_nConnectionCount; extern HANDLE g_hConnectionCount; extern GLOBAL globalInfo; extern unsigned long g_ulIpRefused[100]; extern int g_nRefused; // functions #define OUTPUT(pszMsg) ::SendMessage(globalInfo.hWnd, AGM_OUTPUT, 0, (LPARAM)(LPCTSTR)(pszMsg)) UINT ListeningThread(LPVOID lpVoid); #endif //_WORKING_THREAD_AG_INCLUDED_