Browse Source

use shared local destination for proxies

pull/150/head
orignal 10 years ago
parent
commit
3c9e6054b5
  1. 5
      HTTPProxy.cpp
  2. 2
      HTTPProxy.h
  3. 5
      SOCKS.cpp
  4. 2
      SOCKS.h

5
HTTPProxy.cpp

@ -231,6 +231,11 @@ namespace proxy @@ -231,6 +231,11 @@ namespace proxy
}
}
HTTPProxyServer::HTTPProxyServer(int port):
TCPIPAcceptor(port, i2p::client::context.GetSharedLocalDestination ())
{
}
std::shared_ptr<i2p::client::I2PServiceHandler> HTTPProxyServer::CreateHandler(boost::asio::ip::tcp::socket * socket)
{
return std::make_shared<HTTPProxyHandler> (this, socket);

2
HTTPProxy.h

@ -19,7 +19,7 @@ namespace proxy @@ -19,7 +19,7 @@ namespace proxy
const char* GetName() { return "HTTP Proxy"; }
public:
HTTPProxyServer(int port) : TCPIPAcceptor(port, i2p::data::SIGNING_KEY_TYPE_DSA_SHA1) {}
HTTPProxyServer(int port);
~HTTPProxyServer() {}
};

5
SOCKS.cpp

@ -514,6 +514,11 @@ namespace proxy @@ -514,6 +514,11 @@ namespace proxy
}
}
SOCKSServer::SOCKSServer(int port) :
TCPIPAcceptor (port, i2p::client::context.GetSharedLocalDestination ())
{
}
std::shared_ptr<i2p::client::I2PServiceHandler> SOCKSServer::CreateHandler(boost::asio::ip::tcp::socket * socket)
{
return std::make_shared<SOCKSHandler> (this, socket);

2
SOCKS.h

@ -19,7 +19,7 @@ namespace proxy @@ -19,7 +19,7 @@ namespace proxy
const char* GetName() { return "SOCKS"; }
public:
SOCKSServer(int port) : TCPIPAcceptor(port) {}
SOCKSServer(int port);
~SOCKSServer() {}
};

Loading…
Cancel
Save