ntcp2.published and ntcp2.port parameters
This commit is contained in:
@@ -233,7 +233,9 @@ namespace config {
|
||||
|
||||
options_description ntcp2("NTCP2 Options");
|
||||
ntcp2.add_options()
|
||||
("ntcp2.enabled", value<bool>()->default_value(false), "Enable NTCP2 (experimental, default: disabled)")
|
||||
("ntcp2.enabled", value<bool>()->default_value(false), "Enable NTCP2 (default: disabled)")
|
||||
("ntcp2.published", value<bool>()->default_value(false), "Publish NTCP2 (default: disabled)")
|
||||
("ntcp2.port", value<uint16_t>()->default_value(0), "Port to listen for incoming NTCP2 connections (default: auto)")
|
||||
;
|
||||
|
||||
m_OptionsDesc
|
||||
|
@@ -158,6 +158,8 @@ namespace i2p
|
||||
|
||||
void RouterContext::PublishNTCP2Address (int port)
|
||||
{
|
||||
if (!port)
|
||||
port = rand () % (30777 - 9111) + 9111; // I2P network ports range
|
||||
bool updated = false;
|
||||
for (auto& address : m_RouterInfo.GetAddresses ())
|
||||
{
|
||||
|
Reference in New Issue
Block a user