diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp
index ef1e0716..bc1eccd5 100644
--- a/daemon/HTTPServer.cpp
+++ b/daemon/HTTPServer.cpp
@@ -22,6 +22,7 @@
#include "HTTPServer.h"
#include "Daemon.h"
#include "util.h"
+#include "ECIESX25519AEADRatchetSession.h"
#ifdef WIN32_APP
#include "Win32/Win32App.h"
#endif
@@ -409,6 +410,16 @@ namespace http {
<< "
\r\n
Destination | Amount | \r\n" << tmp_s.str () << "
\r\n
\r\n\r\n";
} else
s << "Outgoing: 0
\r\n";
+ auto numECIESx25519Tags = dest->GetNumIncomingECIESx25519Tags ();
+ if (numECIESx25519Tags > 0)
+ s << "Incoming ECIESx25519: " << numECIESx25519Tags << "
";
+ if (!dest->GetECIESx25519Sessions ().empty ())
+ {
+ s << "
\r\nECIESx25519Tags sessions
";
+ for (const auto& it: dest->GetECIESx25519Sessions ())
+ s << i2p::client::context.GetAddressBook ().ToAddress(it.second->GetDestination ())
+ << " " << it.second->GetState () << "
\r\n";
+ }
s << "
\r\n";
}
diff --git a/libi2pd/ECIESX25519AEADRatchetSession.h b/libi2pd/ECIESX25519AEADRatchetSession.h
index 995bbe4a..6dd842e4 100644
--- a/libi2pd/ECIESX25519AEADRatchetSession.h
+++ b/libi2pd/ECIESX25519AEADRatchetSession.h
@@ -156,6 +156,15 @@ namespace garlic
std::list > m_AckRequests; // (tagsetid, index)
bool m_SendReverseKey = false, m_SendForwardKey = false;
std::unique_ptr m_NextReceiveRatchet, m_NextSendRatchet;
+
+ public:
+
+ // for HTTP only
+ int GetState () const { return (int)m_State; }
+ i2p::data::IdentHash GetDestination () const
+ {
+ return m_Destination ? *m_Destination : i2p::data::IdentHash ();
+ }
};
std::shared_ptr WrapECIESX25519AEADRatchetMessage (std::shared_ptr msg, const uint8_t * key, uint64_t tag);
diff --git a/libi2pd/Garlic.h b/libi2pd/Garlic.h
index ffb66245..2c71abe8 100644
--- a/libi2pd/Garlic.h
+++ b/libi2pd/Garlic.h
@@ -276,7 +276,9 @@ namespace garlic
// for HTTP only
size_t GetNumIncomingTags () const { return m_Tags.size (); }
+ size_t GetNumIncomingECIESx25519Tags () const { return m_ECIESx25519Tags.size (); }
const decltype(m_Sessions)& GetSessions () const { return m_Sessions; };
+ const decltype(m_ECIESx25519Sessions)& GetECIESx25519Sessions () const { return m_ECIESx25519Sessions; }
};
void CleanUpTagsFiles ();