mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
create inbound tunnels per local destination
This commit is contained in:
parent
7caa46b381
commit
cba18faa87
7 changed files with 112 additions and 12 deletions
15
Streaming.h
15
Streaming.h
|
@ -11,6 +11,7 @@
|
|||
#include "LeaseSet.h"
|
||||
#include "I2NPProtocol.h"
|
||||
#include "Tunnel.h"
|
||||
#include "TunnelPool.h"
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
|
@ -97,22 +98,27 @@ namespace stream
|
|||
i2p::tunnel::OutboundTunnel * m_OutboundTunnel;
|
||||
};
|
||||
|
||||
class StreamingDestination
|
||||
class StreamingDestination: public i2p::data::LocalDestination
|
||||
{
|
||||
public:
|
||||
|
||||
StreamingDestination ();
|
||||
~StreamingDestination ();
|
||||
|
||||
void Start ();
|
||||
void Stop ();
|
||||
|
||||
const i2p::data::Keys& GetKeys () const { return m_Keys; };
|
||||
const i2p::data::Identity& GetIdentity () const { return m_Identity; };
|
||||
I2NPMessage * GetLeaseSet ();
|
||||
void Sign (uint8_t * buf, int len, uint8_t * signature) const;
|
||||
|
||||
void Sign (uint8_t * buf, int len, uint8_t * signature) const;
|
||||
|
||||
Stream * CreateNewStream (const i2p::data::LeaseSet& remote);
|
||||
void DeleteStream (Stream * stream);
|
||||
void HandleNextPacket (Packet * packet);
|
||||
|
||||
// implements LocalDestination
|
||||
void UpdateLeaseSet () {}; // TODO:
|
||||
|
||||
private:
|
||||
|
||||
I2NPMessage * CreateLeaseSet () const;
|
||||
|
@ -124,6 +130,7 @@ namespace stream
|
|||
i2p::data::Identity m_Identity;
|
||||
i2p::data::IdentHash m_IdentHash;
|
||||
|
||||
i2p::tunnel::TunnelPool m_TunnelPool;
|
||||
I2NPMessage * m_LeaseSet;
|
||||
|
||||
CryptoPP::DSA::PrivateKey m_SigningPrivateKey;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue