mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
send original user's request through the proxy
This commit is contained in:
parent
0f0110d6a0
commit
52fddadc98
3 changed files with 28 additions and 58 deletions
12
HTTPServer.h
12
HTTPServer.h
|
@ -41,7 +41,8 @@ namespace util
|
|||
|
||||
public:
|
||||
|
||||
HTTPConnection (boost::asio::ip::tcp::socket * socket): m_Socket (socket), m_Stream (nullptr) { Receive (); };
|
||||
HTTPConnection (boost::asio::ip::tcp::socket * socket):
|
||||
m_Socket (socket), m_Stream (nullptr), m_BufferLen (0) { Receive (); };
|
||||
virtual ~HTTPConnection() { delete m_Socket; }
|
||||
|
||||
private:
|
||||
|
@ -68,15 +69,16 @@ namespace util
|
|||
boost::asio::ip::tcp::socket * m_Socket;
|
||||
i2p::stream::Stream * m_Stream;
|
||||
char m_Buffer[8192], m_StreamBuffer[8192];
|
||||
size_t m_BufferLen;
|
||||
request m_Request;
|
||||
reply m_Reply;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
virtual void HandleDestinationRequest(const std::string& address, const std::string& uri);
|
||||
virtual void HandleDestinationRequest(const std::string& address, const std::string& method, const std::string& data, const std::string& uri);
|
||||
|
||||
virtual void RunRequest ();
|
||||
void HandleDestinationRequest(const std::string& address, const std::string& uri);
|
||||
void SendToAddress (const std::string& address, const char * buf, size_t len);
|
||||
void SendToDestination (const i2p::data::IdentHash& destination, const char * buf, size_t len);
|
||||
|
||||
public:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue