mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
removed some SSU1 code
This commit is contained in:
parent
f2729b3efe
commit
1b921a2eac
@ -336,11 +336,7 @@ namespace data
|
|||||||
address->ssu->introducers.resize (index + 1);
|
address->ssu->introducers.resize (index + 1);
|
||||||
}
|
}
|
||||||
Introducer& introducer = address->ssu->introducers.at (index);
|
Introducer& introducer = address->ssu->introducers.at (index);
|
||||||
if (!strcmp (key, "ihost"))
|
if (!strcmp (key, "itag"))
|
||||||
introducer.isH = false; // SSU1
|
|
||||||
else if (!strcmp (key, "iport"))
|
|
||||||
introducer.isH = false; // SSU1
|
|
||||||
else if (!strcmp (key, "itag"))
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -352,10 +348,7 @@ namespace data
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!strcmp (key, "ih"))
|
else if (!strcmp (key, "ih"))
|
||||||
{
|
|
||||||
Base64ToByteStream (value, strlen (value), introducer.iH, 32);
|
Base64ToByteStream (value, strlen (value), introducer.iH, 32);
|
||||||
introducer.isH = true;
|
|
||||||
}
|
|
||||||
else if (!strcmp (key, "iexp"))
|
else if (!strcmp (key, "iexp"))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -411,7 +404,7 @@ namespace data
|
|||||||
int numValid = 0;
|
int numValid = 0;
|
||||||
for (auto& it: address->ssu->introducers)
|
for (auto& it: address->ssu->introducers)
|
||||||
{
|
{
|
||||||
if (it.iTag && ts < it.iExp && it.isH)
|
if (it.iTag && ts < it.iExp)
|
||||||
numValid++;
|
numValid++;
|
||||||
else
|
else
|
||||||
it.iTag = 0;
|
it.iTag = 0;
|
||||||
|
@ -110,11 +110,10 @@ namespace data
|
|||||||
|
|
||||||
struct Introducer
|
struct Introducer
|
||||||
{
|
{
|
||||||
Introducer (): iTag (0), iExp (0), isH (false) {};
|
Introducer (): iTag (0), iExp (0) {};
|
||||||
IdentHash iH;
|
IdentHash iH;
|
||||||
uint32_t iTag;
|
uint32_t iTag;
|
||||||
uint32_t iExp;
|
uint32_t iExp;
|
||||||
bool isH; // TODO: remove later
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SSUExt
|
struct SSUExt
|
||||||
|
@ -1017,7 +1017,6 @@ namespace transport
|
|||||||
i2p::data::RouterInfo::Introducer introducer;
|
i2p::data::RouterInfo::Introducer introducer;
|
||||||
introducer.iTag = it->GetRelayTag ();
|
introducer.iTag = it->GetRelayTag ();
|
||||||
introducer.iH = it->GetRemoteIdentity ()->GetIdentHash ();
|
introducer.iH = it->GetRemoteIdentity ()->GetIdentHash ();
|
||||||
introducer.isH = true;
|
|
||||||
introducer.iExp = it->GetCreationTime () + SSU2_TO_INTRODUCER_SESSION_EXPIRATION;
|
introducer.iExp = it->GetCreationTime () + SSU2_TO_INTRODUCER_SESSION_EXPIRATION;
|
||||||
excluded.insert (it->GetRemoteIdentity ()->GetIdentHash ());
|
excluded.insert (it->GetRemoteIdentity ()->GetIdentHash ());
|
||||||
if (i2p::context.AddSSU2Introducer (introducer, v4))
|
if (i2p::context.AddSSU2Introducer (introducer, v4))
|
||||||
|
Loading…
Reference in New Issue
Block a user