use shared local destination for proxies

This commit is contained in:
orignal 2015-01-17 09:42:44 -05:00
parent 284fb5458e
commit 3c9e6054b5
4 changed files with 12 additions and 2 deletions

View File

@ -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);

View File

@ -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() {}
};

View File

@ -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);

View File

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