mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-09-15 17:41:31 +01:00
handle and publish NTCP2 address
This commit is contained in:
parent
2bd7a92d20
commit
706b976a28
4 changed files with 77 additions and 21 deletions
|
@ -92,8 +92,8 @@ namespace data
|
|||
|
||||
struct NTCP2Ext
|
||||
{
|
||||
uint8_t staticKey[32];
|
||||
uint8_t iv[16];
|
||||
Tag<32> staticKey;
|
||||
Tag<16> iv;
|
||||
};
|
||||
|
||||
struct Address
|
||||
|
@ -122,6 +122,8 @@ namespace data
|
|||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
bool IsNTCP2 () const { return (bool)ntcp2; };
|
||||
};
|
||||
typedef std::list<std::shared_ptr<Address> > Addresses;
|
||||
|
||||
|
@ -143,6 +145,7 @@ namespace data
|
|||
|
||||
void AddNTCPAddress (const char * host, int port);
|
||||
void AddSSUAddress (const char * host, int port, const uint8_t * key, int mtu = 0);
|
||||
void AddNTCP2Address (const uint8_t * staticKey, const uint8_t * iv);
|
||||
bool AddIntroducer (const Introducer& introducer);
|
||||
bool RemoveIntroducer (const boost::asio::ip::udp::endpoint& e);
|
||||
void SetProperty (const std::string& key, const std::string& value); // called from RouterContext only
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue