1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 04:04:16 +00:00

don't disable NTCP2 address if Yggdrasil address is presented

This commit is contained in:
orignal 2021-02-06 19:07:39 -05:00
parent 1bc3de8df4
commit 3b32da4f5c
2 changed files with 6 additions and 1 deletions

View File

@ -202,7 +202,11 @@ namespace util
i2p::context.PublishNTCP2Address (port, false); // unpublish i2p::context.PublishNTCP2Address (port, false); // unpublish
} }
if (ygg) if (ygg)
{
if (!ntcp2)
i2p::context.PublishNTCP2Address (port, true);
i2p::context.UpdateNTCP2V6Address (yggaddr); i2p::context.UpdateNTCP2V6Address (yggaddr);
}
bool transit; i2p::config::GetOption("notransit", transit); bool transit; i2p::config::GetOption("notransit", transit);
i2p::context.SetAcceptsTunnels (!transit); i2p::context.SetAcceptsTunnels (!transit);

View File

@ -679,7 +679,8 @@ namespace i2p
// read NTCP2 // read NTCP2
bool ntcp2; i2p::config::GetOption("ntcp2.enabled", ntcp2); bool ntcp2; i2p::config::GetOption("ntcp2.enabled", ntcp2);
if (ntcp2) bool ygg; i2p::config::GetOption("meshnets.yggdrasil", ygg);
if (ntcp2 || ygg)
{ {
if (!m_NTCP2Keys) NewNTCP2Keys (); if (!m_NTCP2Keys) NewNTCP2Keys ();
UpdateNTCP2Address (true); // enable NTCP2 UpdateNTCP2Address (true); // enable NTCP2