Browse Source

set correct port for unpublished SSU2 addresses

pull/1774/head
orignal 2 years ago
parent
commit
e3eebe537b
  1. 13
      daemon/Daemon.cpp

13
daemon/Daemon.cpp

@ -253,20 +253,13 @@ namespace util
bool ssu2; i2p::config::GetOption("ssu2.enabled", ssu2); bool ssu2; i2p::config::GetOption("ssu2.enabled", ssu2);
if (ssu2) if (ssu2)
{ {
uint16_t ssu2port; i2p::config::GetOption("ssu2.port", ssu2port);
if (!ssu2port) ssu2port = port;
bool published; i2p::config::GetOption("ssu2.published", published); bool published; i2p::config::GetOption("ssu2.published", published);
if (published) if (published)
{
uint16_t ssu2port; i2p::config::GetOption("ssu2.port", ssu2port);
if (!ssu2port)
{
ssu2port = port;
bool ssu; i2p::config::GetOption("ssu", ssu);
if (ssu) ssu2port++;
}
i2p::context.PublishSSU2Address (ssu2port, true, ipv4, ipv6); // publish i2p::context.PublishSSU2Address (ssu2port, true, ipv4, ipv6); // publish
}
else else
i2p::context.PublishSSU2Address (0, false, ipv4, ipv6); // unpublish i2p::context.PublishSSU2Address (ssu2port, false, ipv4, ipv6); // unpublish
} }
bool transit; i2p::config::GetOption("notransit", transit); bool transit; i2p::config::GetOption("notransit", transit);

Loading…
Cancel
Save