mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
don't connect to NTCP2 only address using NTCP
This commit is contained in:
parent
5b83d4bef8
commit
9884a4336f
3 changed files with 13 additions and 10 deletions
|
@ -84,6 +84,11 @@ namespace i2p
|
|||
routerInfo.AddSSUAddress (host.c_str(), port, routerInfo.GetIdentHash ());
|
||||
routerInfo.AddNTCPAddress (host.c_str(), port);
|
||||
}
|
||||
if (ntcp2)
|
||||
{
|
||||
if (!m_NTCP2Keys) NewNTCP2Keys ();
|
||||
routerInfo.AddNTCP2Address (m_NTCP2Keys->staticPublicKey, m_NTCP2Keys->iv);
|
||||
}
|
||||
|
||||
routerInfo.SetCaps (i2p::data::RouterInfo::eReachable |
|
||||
i2p::data::RouterInfo::eSSUTesting | i2p::data::RouterInfo::eSSUIntroducer); // LR, BC
|
||||
|
@ -92,12 +97,6 @@ namespace i2p
|
|||
routerInfo.CreateBuffer (m_Keys);
|
||||
m_RouterInfo.SetRouterIdentity (GetIdentity ());
|
||||
m_RouterInfo.Update (routerInfo.GetBuffer (), routerInfo.GetBufferLen ());
|
||||
|
||||
if (ntcp2) // TODO: should update routerInfo, but we ignore upublished NTCP2 addresses for now
|
||||
{
|
||||
if (!m_NTCP2Keys) NewNTCP2Keys ();
|
||||
UpdateNTCP2Address (true);
|
||||
}
|
||||
}
|
||||
|
||||
void RouterContext::UpdateRouterInfo ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue