1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-12 06:07:54 +00:00

show NTCP2 address

This commit is contained in:
orignal 2018-08-03 12:07:09 -04:00
parent 0a33c18e36
commit 83bbe6a9d9

View File

@ -259,20 +259,21 @@ namespace http {
s << "<b>Our external address:</b>" << "<br>\r\n" ;
for (const auto& address : i2p::context.GetRouterInfo().GetAddresses())
{
if (address->IsNTCP2 ())
if (address->IsNTCP2 () && !address->IsPublishedNTCP2 ())
{
// TODO: show actual address
s << "NTCP2&nbsp;&nbsp; supported <br>\r\n";
continue;
}
switch (address->transportStyle)
{
case i2p::data::RouterInfo::eTransportNTCP:
if (address->host.is_v6 ())
s << "NTCP6&nbsp;&nbsp;";
else
s << "NTCP&nbsp;&nbsp;";
break;
{
s << "NTCP";
if (address->IsPublishedNTCP2 ()) s << "2";
if (address->host.is_v6 ()) s << "6";
s << "&nbsp;&nbsp;";
break;
}
case i2p::data::RouterInfo::eTransportSSU:
if (address->host.is_v6 ())
s << "SSU6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";