mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-04 08:54:23 +00:00
handle .i2p address for BOB inbound connections
This commit is contained in:
parent
08762870b4
commit
519330015f
@ -182,9 +182,15 @@ namespace client
|
|||||||
ident = *identHash;
|
ident = *identHash;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
// if not .b32 we assume full base64 address
|
||||||
|
i2p::data::IdentityEx dest;
|
||||||
|
dest.FromBase64 (address);
|
||||||
|
ident = dest.GetIdentHash ();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const i2p::data::IdentHash * AddressBook::FindAddress (const std::string& address)
|
const i2p::data::IdentHash * AddressBook::FindAddress (const std::string& address)
|
||||||
|
9
BOB.cpp
9
BOB.cpp
@ -76,9 +76,12 @@ namespace client
|
|||||||
m_ReceivedData = (uint8_t *)eol + 1;
|
m_ReceivedData = (uint8_t *)eol + 1;
|
||||||
m_ReceivedDataLen = bytes_transferred - (eol - m_ReceiveBuffer + 1);
|
m_ReceivedDataLen = bytes_transferred - (eol - m_ReceiveBuffer + 1);
|
||||||
i2p::data::IdentHash ident;
|
i2p::data::IdentHash ident;
|
||||||
i2p::data::IdentityEx dest;
|
if (!context.GetAddressBook ().GetIdentHash (m_ReceiveBuffer, ident))
|
||||||
dest.FromBase64 (m_ReceiveBuffer); // TODO: might be .i2p address
|
{
|
||||||
ident = dest.GetIdentHash ();
|
LogPrint (eLogError, "BOB address ", m_ReceiveBuffer, " not found");
|
||||||
|
delete socket;
|
||||||
|
return;
|
||||||
|
}
|
||||||
auto leaseSet = GetLocalDestination ()->FindLeaseSet (ident);
|
auto leaseSet = GetLocalDestination ()->FindLeaseSet (ident);
|
||||||
if (leaseSet)
|
if (leaseSet)
|
||||||
CreateConnection (socket, leaseSet);
|
CreateConnection (socket, leaseSet);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user