mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-18 23:36:39 +01:00
publish i in correct place for NTCP2
This commit is contained in:
parent
a8dcfc44f5
commit
2b64cf9126
1 changed files with 7 additions and 5 deletions
|
@ -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 ());
|
||||||
|
|
Loading…
Add table
Reference in a new issue