Browse Source

show b33 address for encrypted LeaseSet2

pull/1359/head
orignal 5 years ago
parent
commit
743fa745b7
  1. 6
      daemon/HTTPServer.cpp
  2. 1
      libi2pd/Blinding.h
  3. 1
      libi2pd/Destination.h

6
daemon/HTTPServer.cpp

@ -354,6 +354,12 @@ namespace http { @@ -354,6 +354,12 @@ namespace http {
{
s << "<b>Base64:</b><br>\r\n<textarea readonly=\"readonly\" cols=\"64\" rows=\"11\" wrap=\"on\">";
s << dest->GetIdentity ()->ToBase64 () << "</textarea><br>\r\n<br>\r\n";
if (dest->IsEncryptedLeaseSet ())
{
i2p::data::BlindedPublicKey blinded (dest->GetIdentity ());
s << "<b>B33:</b> " << blinded.ToB33 () << ".32.bi2p <br>\r\n";
}
if(dest->GetNumRemoteLeaseSets())
{
s << "<div class='slide'><label for='slide-lease'><b>LeaseSets:</b> <i>" << dest->GetNumRemoteLeaseSets () << "</i></label>\r\n<input type='checkbox' id='slide-lease'/>\r\n<p class='content'>\r\n";

1
libi2pd/Blinding.h

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
#include <inttypes.h>
#include <string>
#include <vector>
#include "Identity.h"
namespace i2p

1
libi2pd/Destination.h

@ -181,6 +181,7 @@ namespace client @@ -181,6 +181,7 @@ namespace client
// for HTTP only
int GetNumRemoteLeaseSets () const { return m_RemoteLeaseSets.size (); };
const decltype(m_RemoteLeaseSets)& GetLeaseSets () const { return m_RemoteLeaseSets; };
bool IsEncryptedLeaseSet () const { return m_LeaseSetType == i2p::data::NETDB_STORE_TYPE_ENCRYPTED_LEASESET2; };
};
class ClientDestination: public LeaseSetDestination

Loading…
Cancel
Save