mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
create NTCP2 ipv6 address
This commit is contained in:
parent
ef76ed394c
commit
5299ac35a6
@ -110,7 +110,17 @@ namespace i2p
|
||||
{
|
||||
bool published; i2p::config::GetOption("ntcp2.published", published);
|
||||
if (published)
|
||||
{
|
||||
PublishNTCP2Address (port, true);
|
||||
if (ipv6)
|
||||
{
|
||||
// add NTCP2 ipv6 address
|
||||
std::string host = "::1";
|
||||
if (!i2p::config::IsDefault ("ntcp2.addressv6"))
|
||||
i2p::config::GetOption ("ntcp2.addressv6", host);
|
||||
m_RouterInfo.AddNTCP2Address (m_NTCP2Keys->staticPublicKey, m_NTCP2Keys->iv, boost::asio::ip::address_v6::from_string (host), port);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -517,7 +527,8 @@ namespace i2p
|
||||
{
|
||||
m_RouterInfo.AddNTCP2Address (m_NTCP2Keys->staticPublicKey, m_NTCP2Keys->iv, host, port);
|
||||
bool ntcp; i2p::config::GetOption("ntcp", ntcp);
|
||||
if (!ntcp)
|
||||
bool ssu; i2p::config::GetOption("ssu", ssu);
|
||||
if (!ntcp && ssu)
|
||||
{
|
||||
// we must publish SSU address
|
||||
auto mtu = i2p::util::net::GetMTU (host);
|
||||
|
Loading…
x
Reference in New Issue
Block a user