mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
exploratory pool added
This commit is contained in:
parent
4970b4d14e
commit
489266e7fc
@ -255,7 +255,7 @@ namespace util
|
|||||||
for (auto it: i2p::tunnel::tunnels.GetInboundTunnels ())
|
for (auto it: i2p::tunnel::tunnels.GetInboundTunnels ())
|
||||||
{
|
{
|
||||||
it.second->GetTunnelConfig ()->Print (s);
|
it.second->GetTunnelConfig ()->Print (s);
|
||||||
if (it.second->GetTunnelPool ())
|
if (it.second->GetTunnelPool () && !it.second->GetTunnelPool ()->IsExploratory ())
|
||||||
s << " " << "Pool";
|
s << " " << "Pool";
|
||||||
if (it.second->IsFailed ())
|
if (it.second->IsFailed ())
|
||||||
s << " " << "Failed";
|
s << " " << "Failed";
|
||||||
|
@ -167,7 +167,7 @@ namespace tunnel
|
|||||||
Tunnels tunnels;
|
Tunnels tunnels;
|
||||||
|
|
||||||
Tunnels::Tunnels (): m_IsRunning (false), m_IsTunnelCreated (false),
|
Tunnels::Tunnels (): m_IsRunning (false), m_IsTunnelCreated (false),
|
||||||
m_NextReplyMsgID (555),m_Thread (0)
|
m_NextReplyMsgID (555), m_Thread (nullptr), m_ExploratoryPool (nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
Tunnel.h
1
Tunnel.h
@ -147,6 +147,7 @@ namespace tunnel
|
|||||||
std::list<OutboundTunnel *> m_OutboundTunnels;
|
std::list<OutboundTunnel *> m_OutboundTunnels;
|
||||||
std::map<uint32_t, TransitTunnel *> m_TransitTunnels;
|
std::map<uint32_t, TransitTunnel *> m_TransitTunnels;
|
||||||
std::map<i2p::data::IdentHash, TunnelPool *> m_Pools;
|
std::map<i2p::data::IdentHash, TunnelPool *> m_Pools;
|
||||||
|
TunnelPool * m_ExploratoryPool;
|
||||||
i2p::util::Queue<I2NPMessage> m_Queue;
|
i2p::util::Queue<I2NPMessage> m_Queue;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "Tunnel.h"
|
#include "Tunnel.h"
|
||||||
#include "NetDb.h"
|
#include "NetDb.h"
|
||||||
#include "Timestamp.h"
|
#include "Timestamp.h"
|
||||||
#include "RouterContext.h"
|
|
||||||
#include "Garlic.h"
|
#include "Garlic.h"
|
||||||
#include "TunnelPool.h"
|
#include "TunnelPool.h"
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "LeaseSet.h"
|
#include "LeaseSet.h"
|
||||||
#include "I2NPProtocol.h"
|
#include "I2NPProtocol.h"
|
||||||
#include "TunnelBase.h"
|
#include "TunnelBase.h"
|
||||||
|
#include "RouterContext.h"
|
||||||
|
|
||||||
namespace i2p
|
namespace i2p
|
||||||
{
|
{
|
||||||
@ -27,7 +28,8 @@ namespace tunnel
|
|||||||
|
|
||||||
const uint8_t * GetEncryptionPrivateKey () const { return m_LocalDestination.GetEncryptionPrivateKey (); };
|
const uint8_t * GetEncryptionPrivateKey () const { return m_LocalDestination.GetEncryptionPrivateKey (); };
|
||||||
const uint8_t * GetEncryptionPublicKey () const { return m_LocalDestination.GetEncryptionPublicKey (); };
|
const uint8_t * GetEncryptionPublicKey () const { return m_LocalDestination.GetEncryptionPublicKey (); };
|
||||||
|
bool IsExploratory () const { return &m_LocalDestination == &i2p::context; };
|
||||||
|
|
||||||
void CreateTunnels ();
|
void CreateTunnels ();
|
||||||
void TunnelCreated (InboundTunnel * createdTunnel);
|
void TunnelCreated (InboundTunnel * createdTunnel);
|
||||||
void TunnelExpired (InboundTunnel * expiredTunnel);
|
void TunnelExpired (InboundTunnel * expiredTunnel);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user