Browse Source

don't disable NTCP2 address if Yggdrasil address is presented

pull/1634/head
orignal 4 years ago
parent
commit
3b32da4f5c
  1. 4
      daemon/Daemon.cpp
  2. 3
      libi2pd/RouterContext.cpp

4
daemon/Daemon.cpp

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

3
libi2pd/RouterContext.cpp

@ -679,7 +679,8 @@ namespace i2p @@ -679,7 +679,8 @@ namespace i2p
// read 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 ();
UpdateNTCP2Address (true); // enable NTCP2

Loading…
Cancel
Save