1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 12:24:19 +00:00

publish i in correct place for NTCP2

This commit is contained in:
orignal 2018-08-01 12:28:34 -04:00
parent a8dcfc44f5
commit 2b64cf9126

View File

@ -538,6 +538,13 @@ namespace data
} }
} }
if (address.IsPublishedNTCP2 ())
{
// publish i for NTCP2
WriteString ("i", properties); properties << '=';
WriteString (address.ntcp2->iv.ToBase64 (), properties); properties << ';';
}
if (!address.IsNTCP2 () || address.IsPublishedNTCP2 ()) if (!address.IsNTCP2 () || address.IsPublishedNTCP2 ())
{ {
WriteString ("port", properties); WriteString ("port", properties);
@ -552,11 +559,6 @@ namespace data
WriteString (address.ntcp2->staticKey.ToBase64 (), properties); properties << ';'; WriteString (address.ntcp2->staticKey.ToBase64 (), properties); properties << ';';
WriteString ("v", properties); properties << '='; WriteString ("v", properties); properties << '=';
WriteString ("2", properties); properties << ';'; WriteString ("2", properties); properties << ';';
if (address.IsPublishedNTCP2 ())
{
WriteString ("i", properties); properties << '=';
WriteString (address.ntcp2->iv.ToBase64 (), properties); properties << ';';
}
} }
uint16_t size = htobe16 (properties.str ().size ()); uint16_t size = htobe16 (properties.str ().size ());