mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Report the inbound listening port during crawl (RIPD-866)
This commit is contained in:
@@ -595,12 +595,21 @@ OverlayImpl::crawl()
|
||||
pv[jss::public_key] = beast::base64_encode(
|
||||
sp->getNodePublic().getNodePublic().data(),
|
||||
sp->getNodePublic().getNodePublic().size());
|
||||
pv[jss::type] = sp->slot()->inbound() ?
|
||||
"in" : "out";
|
||||
if (sp->crawl())
|
||||
{
|
||||
pv[jss::ip] = sp->getRemoteAddress().address().to_string();
|
||||
if (sp->slot()->inbound())
|
||||
pv[jss::ip] = sp->getRemoteAddress().address().to_string();
|
||||
{
|
||||
if (auto port = sp->slot()->listening_port())
|
||||
pv[jss::port] = *port;
|
||||
}
|
||||
else
|
||||
pv[jss::ip] = sp->getRemoteAddress().to_string();
|
||||
{
|
||||
pv[jss::port] = std::to_string(
|
||||
sp->getRemoteAddress().port());
|
||||
}
|
||||
}
|
||||
auto version = sp->getVersion ();
|
||||
if (!version.empty ())
|
||||
|
||||
Reference in New Issue
Block a user