mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
Make HTTPProxy use SIGNING_KEY_TYPE_DSA_SHA1
This commit is contained in:
parent
29039fd039
commit
bcbe207515
@ -26,7 +26,7 @@ namespace proxy
|
||||
void HandleAccept(const boost::system::error_code& ecode, boost::asio::ip::tcp::socket * socket);
|
||||
|
||||
public:
|
||||
HTTPProxyServer(int port) : I2PService(nullptr),
|
||||
HTTPProxyServer(int port) : I2PService(i2p::data::SIGNING_KEY_TYPE_DSA_SHA1),
|
||||
m_Acceptor (GetService (), boost::asio::ip::tcp::endpoint (boost::asio::ip::tcp::v4(), port)),
|
||||
m_Timer (GetService ()) {};
|
||||
~HTTPProxyServer() { Stop(); }
|
||||
|
@ -16,11 +16,16 @@ namespace client
|
||||
{
|
||||
}
|
||||
|
||||
void ClientDestination::CreateStream (StreamRequestComplete streamRequestComplete, const std::string& dest, int port) {
|
||||
I2PService::I2PService (i2p::data::SigningKeyType kt):
|
||||
m_LocalDestination (i2p::client::context.CreateNewLocalDestination (false, kt))
|
||||
{
|
||||
}
|
||||
|
||||
void I2PService::CreateStream (StreamRequestComplete streamRequestComplete, const std::string& dest, int port) {
|
||||
assert(streamRequestComplete);
|
||||
i2p::data::IdentHash identHash;
|
||||
if (i2p::client::context.GetAddressBook ().GetIdentHash (dest, identHash))
|
||||
localDestination->CreateStream (streamRequestComplete, identHash, port);
|
||||
m_LocalDestination->CreateStream (streamRequestComplete, identHash, port);
|
||||
else
|
||||
{
|
||||
LogPrint (eLogWarning, "Remote destination ", dest, " not found");
|
||||
|
@ -18,6 +18,7 @@ namespace client
|
||||
{
|
||||
public:
|
||||
I2PService (ClientDestination * localDestination = nullptr);
|
||||
I2PService (i2p::data::SigningKeyType kt);
|
||||
virtual ~I2PService () { ClearHandlers (); }
|
||||
|
||||
inline void AddHandler (std::shared_ptr<I2PServiceHandler> conn) {
|
||||
@ -53,7 +54,7 @@ namespace client
|
||||
class I2PServiceHandler
|
||||
{
|
||||
public:
|
||||
I2PServiceHandler(I2PService * parent) : m_Dead(false), m_Service(parent) { }
|
||||
I2PServiceHandler(I2PService * parent) : m_Service(parent), m_Dead(false) { }
|
||||
virtual ~I2PServiceHandler() { }
|
||||
protected:
|
||||
// Call when terminating or handing over to avoid race conditions
|
||||
|
@ -172,7 +172,7 @@ namespace proxy
|
||||
boost::asio::const_buffers_1 SOCKSHandler::GenerateSOCKS5Response(SOCKSHandler::errTypes error, SOCKSHandler::addrTypes type,
|
||||
const SOCKSHandler::address &addr, uint16_t port)
|
||||
{
|
||||
size_t size;
|
||||
size_t size = 6;
|
||||
assert(error <= SOCKS5_ADDR_UNSUP);
|
||||
m_response[0] = '\x05'; //Version
|
||||
m_response[1] = error; //Response code
|
||||
|
Loading…
Reference in New Issue
Block a user