mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-31 09:04:14 +00:00
use shared local destination for proxies
This commit is contained in:
parent
284fb5458e
commit
3c9e6054b5
@ -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)
|
std::shared_ptr<i2p::client::I2PServiceHandler> HTTPProxyServer::CreateHandler(boost::asio::ip::tcp::socket * socket)
|
||||||
{
|
{
|
||||||
return std::make_shared<HTTPProxyHandler> (this, socket);
|
return std::make_shared<HTTPProxyHandler> (this, socket);
|
||||||
|
@ -19,7 +19,7 @@ namespace proxy
|
|||||||
const char* GetName() { return "HTTP Proxy"; }
|
const char* GetName() { return "HTTP Proxy"; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
HTTPProxyServer(int port) : TCPIPAcceptor(port, i2p::data::SIGNING_KEY_TYPE_DSA_SHA1) {}
|
HTTPProxyServer(int port);
|
||||||
~HTTPProxyServer() {}
|
~HTTPProxyServer() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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)
|
std::shared_ptr<i2p::client::I2PServiceHandler> SOCKSServer::CreateHandler(boost::asio::ip::tcp::socket * socket)
|
||||||
{
|
{
|
||||||
return std::make_shared<SOCKSHandler> (this, socket);
|
return std::make_shared<SOCKSHandler> (this, socket);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user