mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-13 08:17:38 +01:00
add local address and port to webconsole (issue #1877)
This commit is contained in:
parent
5a09c11e90
commit
008fb561b8
2 changed files with 19 additions and 6 deletions
|
@ -977,7 +977,9 @@ namespace http {
|
|||
{
|
||||
auto& ident = it.second->GetLocalDestination ()->GetIdentHash();
|
||||
s << "<div class=\"listitem\"><a href=\"" << webroot << "?page=" << HTTP_PAGE_LOCAL_DESTINATION << "&b32=" << ident.ToBase32 () << "\">";
|
||||
s << it.second->GetName () << "</a> ⇐ ";
|
||||
s << it.second->GetName () << "</a> ";
|
||||
s << it.first.address() << ":" << it.first.port();
|
||||
s << " ⇒ ";
|
||||
s << i2p::client::context.GetAddressBook ().ToAddress(ident);
|
||||
s << "</div>\r\n"<< std::endl;
|
||||
}
|
||||
|
@ -986,7 +988,9 @@ namespace http {
|
|||
{
|
||||
auto& ident = httpProxy->GetLocalDestination ()->GetIdentHash();
|
||||
s << "<div class=\"listitem\"><a href=\"" << webroot << "?page=" << HTTP_PAGE_LOCAL_DESTINATION << "&b32=" << ident.ToBase32 () << "\">";
|
||||
s << "HTTP " << tr("Proxy") << "</a> ⇐ ";
|
||||
s << "HTTP " << tr("Proxy") << "</a> ";
|
||||
s << httpProxy->GetLocalEndpoint().address() << ":" << httpProxy->GetLocalEndpoint().port();
|
||||
s << " ⇒ ";
|
||||
s << i2p::client::context.GetAddressBook ().ToAddress(ident);
|
||||
s << "</div>\r\n"<< std::endl;
|
||||
}
|
||||
|
@ -995,7 +999,9 @@ namespace http {
|
|||
{
|
||||
auto& ident = socksProxy->GetLocalDestination ()->GetIdentHash();
|
||||
s << "<div class=\"listitem\"><a href=\"" << webroot << "?page=" << HTTP_PAGE_LOCAL_DESTINATION << "&b32=" << ident.ToBase32 () << "\">";
|
||||
s << "SOCKS " << tr("Proxy") << "</a> ⇐ ";
|
||||
s << "SOCKS " << tr("Proxy") << "</a> ";
|
||||
s << httpProxy->GetLocalEndpoint().address() << ":" << httpProxy->GetLocalEndpoint().port();
|
||||
s << " ⇒ ";
|
||||
s << i2p::client::context.GetAddressBook ().ToAddress(ident);
|
||||
s << "</div>\r\n"<< std::endl;
|
||||
}
|
||||
|
@ -1008,7 +1014,9 @@ namespace http {
|
|||
{
|
||||
auto& ident = it.second->GetLocalDestination ()->GetIdentHash();
|
||||
s << "<div class=\"listitem\"><a href=\"" << webroot << "?page=" << HTTP_PAGE_LOCAL_DESTINATION << "&b32=" << ident.ToBase32 () << "\">";
|
||||
s << it.second->GetName () << "</a> ⇒ ";
|
||||
s << it.second->GetName () << "</a> ";
|
||||
s << it.second->GetEndpoint().address() << ":" << it.second->GetEndpoint().port();
|
||||
s << " ⇐ ";
|
||||
s << i2p::client::context.GetAddressBook ().ToAddress(ident);
|
||||
s << ":" << it.second->GetLocalPort ();
|
||||
s << "</a></div>\r\n"<< std::endl;
|
||||
|
@ -1024,7 +1032,9 @@ namespace http {
|
|||
{
|
||||
auto& ident = it.second->GetLocalDestination ()->GetIdentHash();
|
||||
s << "<div class=\"listitem\"><a href=\"" << webroot << "?page=" << HTTP_PAGE_LOCAL_DESTINATION << "&b32=" << ident.ToBase32 () << "\">";
|
||||
s << it.second->GetName () << "</a> ⇐ ";
|
||||
s << it.second->GetName () << "</a> ";
|
||||
s << it.first.address() << ":" << it.first.port();
|
||||
s << " ⇒ ";
|
||||
s << i2p::client::context.GetAddressBook ().ToAddress(ident);
|
||||
s << "</div>\r\n"<< std::endl;
|
||||
}
|
||||
|
@ -1038,7 +1048,9 @@ namespace http {
|
|||
{
|
||||
auto& ident = it.second->GetLocalDestination ()->GetIdentHash();
|
||||
s << "<div class=\"listitem\"><a href=\"" << webroot << "?page=" << HTTP_PAGE_LOCAL_DESTINATION << "&b32=" << ident.ToBase32 () << "\">";
|
||||
s << it.second->GetName () << "</a> ⇐ ";
|
||||
s << it.second->GetName () << "</a> ";
|
||||
s << it.second->GetEndpoint().address() << ":" << it.second->GetEndpoint().port();
|
||||
s << " ⇐ ";
|
||||
s << i2p::client::context.GetAddressBook ().ToAddress(ident);
|
||||
s << "</div>\r\n"<< std::endl;
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ namespace client
|
|||
const char * GetName () const { return m_Name.c_str(); }
|
||||
std::vector<std::shared_ptr<DatagramSessionInfo> > GetSessions ();
|
||||
std::shared_ptr<ClientDestination> GetLocalDestination () const { return m_LocalDest; }
|
||||
const boost::asio::ip::udp::endpoint& GetEndpoint () const { return m_RemoteEndpoint; }
|
||||
|
||||
void SetUniqueLocal (bool isUniqueLocal = true) { m_IsUniqueLocal = isUniqueLocal; }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue