|
|
@ -51,13 +51,13 @@ namespace i2p |
|
|
|
port = rand () % (30777 - 9111) + 9111; // I2P network ports range
|
|
|
|
port = rand () % (30777 - 9111) + 9111; // I2P network ports range
|
|
|
|
if (port == 9150) port = 9151; // Tor browser
|
|
|
|
if (port == 9150) port = 9151; // Tor browser
|
|
|
|
} |
|
|
|
} |
|
|
|
bool ipv4; i2p::config::GetOption("ipv4", ipv4); |
|
|
|
bool ipv4; i2p::config::GetOption("ipv4", ipv4); |
|
|
|
bool ipv6; i2p::config::GetOption("ipv6", ipv6); |
|
|
|
bool ipv6; i2p::config::GetOption("ipv6", ipv6); |
|
|
|
bool ssu; i2p::config::GetOption("ssu", ssu); |
|
|
|
bool ssu; i2p::config::GetOption("ssu", ssu); |
|
|
|
bool ntcp; i2p::config::GetOption("ntcp", ntcp); |
|
|
|
bool ntcp; i2p::config::GetOption("ntcp", ntcp); |
|
|
|
bool ntcp2; i2p::config::GetOption("ntcp2.enabled", ntcp2); |
|
|
|
bool ntcp2; i2p::config::GetOption("ntcp2.enabled", ntcp2); |
|
|
|
bool nat; i2p::config::GetOption("nat", nat); |
|
|
|
bool nat; i2p::config::GetOption("nat", nat); |
|
|
|
std::string ifname; i2p::config::GetOption("ifname", ifname); |
|
|
|
std::string ifname; i2p::config::GetOption("ifname", ifname); |
|
|
|
std::string ifname4; i2p::config::GetOption("ifname4", ifname4); |
|
|
|
std::string ifname4; i2p::config::GetOption("ifname4", ifname4); |
|
|
|
std::string ifname6; i2p::config::GetOption("ifname6", ifname6); |
|
|
|
std::string ifname6; i2p::config::GetOption("ifname6", ifname6); |
|
|
|
if (ipv4) |
|
|
|
if (ipv4) |
|
|
@ -79,7 +79,7 @@ namespace i2p |
|
|
|
} |
|
|
|
} |
|
|
|
if (ipv6) |
|
|
|
if (ipv6) |
|
|
|
{ |
|
|
|
{ |
|
|
|
std::string host = "::"; |
|
|
|
std::string host = "::1"; |
|
|
|
if (!i2p::config::IsDefault("host") && !ipv4) // override if v6 only
|
|
|
|
if (!i2p::config::IsDefault("host") && !ipv4) // override if v6 only
|
|
|
|
i2p::config::GetOption("host", host); |
|
|
|
i2p::config::GetOption("host", host); |
|
|
|
else if (!ifname.empty()) |
|
|
|
else if (!ifname.empty()) |
|
|
@ -113,7 +113,6 @@ namespace i2p |
|
|
|
PublishNTCP2Address (port, true); |
|
|
|
PublishNTCP2Address (port, true); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void RouterContext::UpdateRouterInfo () |
|
|
|
void RouterContext::UpdateRouterInfo () |
|
|
|