mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
Merge pull request #484 from weekendi2p/openssl
Show family name in web interface
This commit is contained in:
commit
c5f2890cbe
@ -189,6 +189,7 @@ namespace i2p
|
|||||||
|
|
||||||
std::string family; i2p::config::GetOption("family", family);
|
std::string family; i2p::config::GetOption("family", family);
|
||||||
i2p::context.SetFamily (family);
|
i2p::context.SetFamily (family);
|
||||||
|
i2p::context.SetFamilyString (family);
|
||||||
if (family.length () > 0)
|
if (family.length () > 0)
|
||||||
LogPrint(eLogInfo, "Daemon: family set to ", family);
|
LogPrint(eLogInfo, "Daemon: family set to ", family);
|
||||||
|
|
||||||
|
@ -417,6 +417,7 @@ namespace util
|
|||||||
default: s << "Unknown";
|
default: s << "Unknown";
|
||||||
}
|
}
|
||||||
s << "<br>\r\n";
|
s << "<br>\r\n";
|
||||||
|
s << "<b>Family:</b> " << i2p::context.GetFamilyString() << "<br>\r\n";
|
||||||
s << "<b>Tunnel creation success rate:</b> " << i2p::tunnel::tunnels.GetTunnelCreationSuccessRate () << "%<br>\r\n";
|
s << "<b>Tunnel creation success rate:</b> " << i2p::tunnel::tunnels.GetTunnelCreationSuccessRate () << "%<br>\r\n";
|
||||||
s << "<b>Received:</b> ";
|
s << "<b>Received:</b> ";
|
||||||
s << std::fixed << std::setprecision(2);
|
s << std::fixed << std::setprecision(2);
|
||||||
|
@ -149,6 +149,19 @@ namespace i2p
|
|||||||
UpdateRouterInfo ();
|
UpdateRouterInfo ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RouterContext::SetFamilyString (const std::string& family)
|
||||||
|
{
|
||||||
|
if (family.length() > 0)
|
||||||
|
m_FamilyString = family;
|
||||||
|
else
|
||||||
|
m_FamilyString = "<undefined>";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string RouterContext::GetFamilyString () const
|
||||||
|
{
|
||||||
|
return m_FamilyString;
|
||||||
|
}
|
||||||
|
|
||||||
void RouterContext::SetFamily (const std::string& family)
|
void RouterContext::SetFamily (const std::string& family)
|
||||||
{
|
{
|
||||||
std::string signature;
|
std::string signature;
|
||||||
|
@ -59,6 +59,8 @@ namespace i2p
|
|||||||
bool IsFloodfill () const { return m_IsFloodfill; };
|
bool IsFloodfill () const { return m_IsFloodfill; };
|
||||||
void SetFloodfill (bool floodfill);
|
void SetFloodfill (bool floodfill);
|
||||||
void SetFamily (const std::string& family);
|
void SetFamily (const std::string& family);
|
||||||
|
void SetFamilyString (const std::string& family);
|
||||||
|
std::string GetFamilyString () const;
|
||||||
void SetBandwidth (int limit); /* in kilobytes */
|
void SetBandwidth (int limit); /* in kilobytes */
|
||||||
void SetBandwidth (char L); /* by letter */
|
void SetBandwidth (char L); /* by letter */
|
||||||
bool AcceptsTunnels () const { return m_AcceptsTunnels; };
|
bool AcceptsTunnels () const { return m_AcceptsTunnels; };
|
||||||
@ -100,6 +102,7 @@ namespace i2p
|
|||||||
i2p::data::PrivateKeys m_Keys;
|
i2p::data::PrivateKeys m_Keys;
|
||||||
uint64_t m_LastUpdateTime;
|
uint64_t m_LastUpdateTime;
|
||||||
bool m_AcceptsTunnels, m_IsFloodfill;
|
bool m_AcceptsTunnels, m_IsFloodfill;
|
||||||
|
std::string m_FamilyString;
|
||||||
uint64_t m_StartupTime; // in seconds since epoch
|
uint64_t m_StartupTime; // in seconds since epoch
|
||||||
uint32_t m_BandwidthLimit; // allowed bandwidth
|
uint32_t m_BandwidthLimit; // allowed bandwidth
|
||||||
RouterStatus m_Status;
|
RouterStatus m_Status;
|
||||||
|
Loading…
Reference in New Issue
Block a user