mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add RPC/WS ports to server_info (#4427)
Enhance the /crawl endpoint by publishing WebSocket/RPC ports in the server_info response. The function processing requests to the /crawl endpoint actually calls server_info internally, so this change enables a server to advertise its WebSocket/RPC port(s) to peers via the /crawl endpoint. `grpc` and `peer` ports are included as well. The new `ports` array contains objects, each containing a `port` for the listening port (number string), and an array `protocol` listing the supported protocol(s). This allows crawlers to build a richer topology without needing to port-scan nodes. For non-admin users (including peers), the info about *admin* ports is excluded. Also increase test coverage for RPC ServerInfo. Fix #2837.
This commit is contained in:
@@ -602,6 +602,13 @@ public:
|
||||
return *m_networkOPs;
|
||||
}
|
||||
|
||||
virtual ServerHandlerImp&
|
||||
getServerHandler() override
|
||||
{
|
||||
assert(serverHandler_);
|
||||
return *serverHandler_;
|
||||
}
|
||||
|
||||
boost::asio::io_service&
|
||||
getIOService() override
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user