|
|
@ -307,42 +307,32 @@ namespace http { |
|
|
|
s << "<b>"<< tr("Our external address") << ":</b>" << "<br>\r\n<table class=\"extaddr\"><tbody>\r\n"; |
|
|
|
s << "<b>"<< tr("Our external address") << ":</b>" << "<br>\r\n<table class=\"extaddr\"><tbody>\r\n"; |
|
|
|
for (const auto& address : i2p::context.GetRouterInfo().GetAddresses()) |
|
|
|
for (const auto& address : i2p::context.GetRouterInfo().GetAddresses()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
s << "<tr>\r\n"; |
|
|
|
s << "<tr>\r\n<td>"; |
|
|
|
if (address->IsNTCP2 () && !address->IsPublishedNTCP2 ()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
s << "<td>NTCP2"; |
|
|
|
|
|
|
|
if (address->IsV6 ()) s << "v6"; |
|
|
|
|
|
|
|
s << "</td><td>" << tr("supported") << "</td>\r\n</tr>\r\n"; |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
switch (address->transportStyle) |
|
|
|
switch (address->transportStyle) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case i2p::data::RouterInfo::eTransportNTCP: |
|
|
|
case i2p::data::RouterInfo::eTransportNTCP: |
|
|
|
{ |
|
|
|
s << "NTCP2"; |
|
|
|
s << "<td>NTCP"; |
|
|
|
|
|
|
|
if (address->IsPublishedNTCP2 ()) s << "2"; |
|
|
|
|
|
|
|
if (address->IsV6 ()) s << "v6"; |
|
|
|
|
|
|
|
s << "</td>\r\n"; |
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
case i2p::data::RouterInfo::eTransportSSU: |
|
|
|
case i2p::data::RouterInfo::eTransportSSU: |
|
|
|
{ |
|
|
|
s << "SSU"; |
|
|
|
s << "<td>SSU"; |
|
|
|
|
|
|
|
if (address->IsV6 ()) s << "v6"; |
|
|
|
|
|
|
|
s << "</td>\r\n"; |
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
case i2p::data::RouterInfo::eTransportSSU2: |
|
|
|
case i2p::data::RouterInfo::eTransportSSU2: |
|
|
|
{ |
|
|
|
s << "SSU2"; |
|
|
|
s << "<td>SSU2"; |
|
|
|
|
|
|
|
if (address->IsV6 ()) s << "v6"; |
|
|
|
|
|
|
|
s << "</td><td>" << tr("supported") << "</td>\r\n</tr>\r\n"; |
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
default: |
|
|
|
default: |
|
|
|
s << "<td>" << tr("Unknown") << "</td>\r\n"; |
|
|
|
s << tr("Unknown"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (address->IsV6 ()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (address->IsV4 ()) s << "v4"; |
|
|
|
|
|
|
|
s << "v6"; |
|
|
|
} |
|
|
|
} |
|
|
|
s << "<td>" << address->host.to_string() << ":" << address->port << "</td>\r\n</tr>\r\n"; |
|
|
|
s << "</td>\r\n"; |
|
|
|
|
|
|
|
if (address->published) |
|
|
|
|
|
|
|
s << "<td>" << address->host.to_string() << ":" << address->port << "</td>\r\n"; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
s << "<td>" << tr("supported") << "</td>\r\n"; |
|
|
|
|
|
|
|
s << "</tr>\r\n"; |
|
|
|
} |
|
|
|
} |
|
|
|
s << "</tbody></table>\r\n"; |
|
|
|
s << "</tbody></table>\r\n"; |
|
|
|
} |
|
|
|
} |
|
|
|