File: proxyhandler.h

package info (click to toggle)
havp 0.89-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,284 kB
  • ctags: 597
  • sloc: cpp: 7,161; sh: 497; makefile: 142
file content (87 lines) | stat: -rw-r--r-- 2,222 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/***************************************************************************
                          proxyhandler.h  -  description
                             -------------------
    begin                : So Feb 20 2005
    copyright            : (C) 2005 by Christian Hilgers
    email                : christian@hilgers.ag
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef PROXYHANDLER_H
#define PROXYHANDLER_H

#include "default.h"
#include "connectiontobrowser.h"
#include "connectiontohttp.h"
#include "scannerhandler.h"

#include <string>

using namespace std;

class ProxyHandler {

private:

bool HeaderSend;
bool BrowserDropped;
bool DropBrowser;
bool ScannerUsed;
bool UnlockDone;
bool AnswerDone;
bool ReinitDone;
bool ServerClosed;
bool ServerConnected;
bool DropServer;
int alivecount;
string ConnectedHost;
int ConnectedPort;

string Header;

ConnectionToBrowser ToBrowser;
ConnectionToHTTP ToServer;

bool UseParentProxy;
string ParentHost;
int ParentPort;

int MaxDownloadSize;
int KeepBackTime;
int TricklingTime;
unsigned int TricklingBytes;
int KeepBackBuffer;

int TransferredHeader;
long long TransferredBody;

bool DontLockBINHEX;
bool DontLockPDF;
bool DontLockZIP;

bool ProxyMessage( int CommunicationAnswerT, string Answer );
int CommunicationHTTP( ScannerHandler &Scanners, bool ScannerOff );
int CommunicationFTP( ScannerHandler &Scanners, bool ScannerOff );

#ifdef SSLTUNNEL
int CommunicationSSL();
#endif

public:

void Proxy( SocketHandler &ProxyServerT, ScannerHandler &Scanners );
 
ProxyHandler();
~ProxyHandler();

};

#endif