mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
different tunnel build record size
This commit is contained in:
parent
59dd60f5cb
commit
d47bf1bada
2 changed files with 15 additions and 6 deletions
|
@ -115,6 +115,8 @@ namespace tunnel
|
|||
}
|
||||
}
|
||||
|
||||
bool IsShort () const { return m_IsShort; }
|
||||
|
||||
TunnelHopConfig * GetFirstHop () const
|
||||
{
|
||||
return m_FirstHop;
|
||||
|
@ -193,10 +195,15 @@ namespace tunnel
|
|||
for (const auto& it: peers)
|
||||
{
|
||||
TunnelHopConfig * hop;
|
||||
if (it->GetCryptoKeyType () == i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD)
|
||||
hop = new LongECIESTunnelHopConfig (it);
|
||||
if (m_IsShort)
|
||||
hop = new ShortECIESTunnelHopConfig (it);
|
||||
else
|
||||
hop = new ElGamalTunnelHopConfig (it);
|
||||
{
|
||||
if (it->GetCryptoKeyType () == i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD)
|
||||
hop = new LongECIESTunnelHopConfig (it);
|
||||
else
|
||||
hop = new ElGamalTunnelHopConfig (it);
|
||||
}
|
||||
if (prev)
|
||||
prev->SetNext (hop);
|
||||
else
|
||||
|
@ -209,6 +216,7 @@ namespace tunnel
|
|||
private:
|
||||
|
||||
TunnelHopConfig * m_FirstHop, * m_LastHop;
|
||||
bool m_IsShort = false;
|
||||
};
|
||||
|
||||
class ZeroHopsTunnelConfig: public TunnelConfig
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue