|
|
@ -33,11 +33,13 @@ namespace tunnel |
|
|
|
const i2p::crypto::AESKey& layerKey, const i2p::crypto::AESKey& ivKey); |
|
|
|
const i2p::crypto::AESKey& layerKey, const i2p::crypto::AESKey& ivKey); |
|
|
|
|
|
|
|
|
|
|
|
virtual size_t GetNumTransmittedBytes () const { return 0; }; |
|
|
|
virtual size_t GetNumTransmittedBytes () const { return 0; }; |
|
|
|
|
|
|
|
virtual std::string GetNextPeerName () const; |
|
|
|
|
|
|
|
|
|
|
|
// implements TunnelBase
|
|
|
|
// implements TunnelBase
|
|
|
|
void SendTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage> msg) override; |
|
|
|
void SendTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage> msg) override; |
|
|
|
void HandleTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage>&& tunnelMsg) override; |
|
|
|
void HandleTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage>&& tunnelMsg) override; |
|
|
|
void EncryptTunnelMsg (std::shared_ptr<const I2NPMessage> in, std::shared_ptr<I2NPMessage> out) override; |
|
|
|
void EncryptTunnelMsg (std::shared_ptr<const I2NPMessage> in, std::shared_ptr<I2NPMessage> out) override; |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
|
|
|
|
|
|
|
|
i2p::crypto::AESKey m_LayerKey, m_IVKey; |
|
|
|
i2p::crypto::AESKey m_LayerKey, m_IVKey; |
|
|
@ -56,6 +58,7 @@ namespace tunnel |
|
|
|
~TransitTunnelParticipant (); |
|
|
|
~TransitTunnelParticipant (); |
|
|
|
|
|
|
|
|
|
|
|
size_t GetNumTransmittedBytes () const override { return m_NumTransmittedBytes; }; |
|
|
|
size_t GetNumTransmittedBytes () const override { return m_NumTransmittedBytes; }; |
|
|
|
|
|
|
|
std::string GetNextPeerName () const override; |
|
|
|
void HandleTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage>&& tunnelMsg) override; |
|
|
|
void HandleTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage>&& tunnelMsg) override; |
|
|
|
void FlushTunnelDataMsgs () override; |
|
|
|
void FlushTunnelDataMsgs () override; |
|
|
|
|
|
|
|
|
|
|
@ -79,6 +82,7 @@ namespace tunnel |
|
|
|
void SendTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage> msg) override; |
|
|
|
void SendTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage> msg) override; |
|
|
|
void FlushTunnelDataMsgs () override; |
|
|
|
void FlushTunnelDataMsgs () override; |
|
|
|
size_t GetNumTransmittedBytes () const override { return m_Gateway.GetNumSentBytes (); }; |
|
|
|
size_t GetNumTransmittedBytes () const override { return m_Gateway.GetNumSentBytes (); }; |
|
|
|
|
|
|
|
std::string GetNextPeerName () const override; |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
|
|
|
|
|
|
|
@ -100,6 +104,7 @@ namespace tunnel |
|
|
|
|
|
|
|
|
|
|
|
void HandleTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage>&& tunnelMsg) override; |
|
|
|
void HandleTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage>&& tunnelMsg) override; |
|
|
|
size_t GetNumTransmittedBytes () const override { return m_Endpoint.GetNumReceivedBytes (); } |
|
|
|
size_t GetNumTransmittedBytes () const override { return m_Endpoint.GetNumReceivedBytes (); } |
|
|
|
|
|
|
|
std::string GetNextPeerName () const override { return ""; } |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
|
|
|
|
|
|
|
|