1#include <xrpld/app/main/Application.h>
2#include <xrpld/app/misc/NetworkOPs.h>
3#include <xrpld/core/ConfigSections.h>
4#include <xrpld/overlay/Overlay.h>
5#include <xrpld/rpc/RPCHandler.h>
6#include <xrpld/rpc/Role.h>
7#include <xrpld/rpc/ServerHandler.h>
8#include <xrpld/rpc/detail/Tuning.h>
9#include <xrpld/rpc/detail/WSInfoSub.h>
10#include <xrpld/rpc/json_body.h>
12#include <xrpl/basics/Log.h>
13#include <xrpl/basics/base64.h>
14#include <xrpl/basics/contract.h>
15#include <xrpl/basics/make_SSLContext.h>
16#include <xrpl/beast/net/IPAddressConversion.h>
17#include <xrpl/beast/rfc2616.h>
18#include <xrpl/core/JobQueue.h>
19#include <xrpl/json/json_reader.h>
20#include <xrpl/json/to_string.h>
21#include <xrpl/protocol/ApiVersion.h>
22#include <xrpl/protocol/ErrorCodes.h>
23#include <xrpl/protocol/RPCErr.h>
24#include <xrpl/resource/Fees.h>
25#include <xrpl/resource/ResourceManager.h>
26#include <xrpl/server/Server.h>
27#include <xrpl/server/SimpleWriter.h>
28#include <xrpl/server/detail/JSONRPCUtil.h>
30#include <boost/algorithm/string.hpp>
31#include <boost/beast/http/fields.hpp>
32#include <boost/beast/http/string_body.hpp>
49 return request.version() >= 11 && request.target() ==
"/" && request.body().size() == 0 &&
50 request.method() == boost::beast::http::verb::get;
56 using namespace boost::beast::http;
58 response<string_body> msg;
59 msg.version(request.version());
62 msg.insert(
"Content-Type",
"text/html");
63 msg.insert(
"Connection",
"close");
64 msg.body() =
"Invalid protocol.";
65 msg.prepare_payload();
77 auto const it = h.
find(
"authorization");
78 if ((it == h.
end()) || (it->second.substr(0, 6) !=
"Basic "))
81 boost::trim(strUserPass64);
83 std::string::size_type nColon = strUserPass.
find(
":");
84 if (nColon == std::string::npos)
88 return strUser == port.
user && strPassword == port.
password;
94 boost::asio::io_context& io_context,
100 , m_resourceManager(resourceManager)
101 , m_journal(app_.journal(
"Server"))
102 , m_networkOPs(networkOPs)
103 , m_server(
make_Server(*this, io_context, app_.journal(
"Server")))
104 , m_jobQueue(jobQueue)
106 auto const& group(cm.
group(
"rpc"));
128 auto const endpointPort = it->second.port();
130 port.port = endpointPort;
132 if (!
setup_.
client.
port && (port.protocol.count(
"http") > 0 || port.protocol.count(
"https") > 0))
135 if (!
setup_.
overlay.port() && (port.protocol.count(
"peer") > 0))
158 auto const& port = session.
port();
160 auto const c = [
this, &port]() {
165 if (port.limit && c >= port.limit)
167 JLOG(
m_journal.
trace()) << port.name <<
" is full; dropping " << endpoint;
179 boost::asio::ip::tcp::endpoint
const& remote_address)
181 using namespace boost::beast;
183 bool const is_ws{p.
count(
"ws") > 0 || p.count(
"ws2") > 0 || p.count(
"wss") > 0 || p.count(
"wss2") > 0};
185 if (websocket::is_upgrade(request))
205 beast_remote_address,
208 is->forwarded_for());
209 ws->appDefined = std::move(is);
213 handoff.
moved =
true;
217 if (bundle && p.count(
"peer") > 0)
230 return [&](boost::beast::string_view
const& b) { session.
write(b.data(), b.size()); };
237 for (
auto const& e : h)
243 key.
begin(), key.
end(), key.
begin(), [](
auto kc) { return std::tolower(static_cast<unsigned char>(kc)); });
249template <
class ConstBufferSequence>
253 using boost::asio::buffer_size;
259 s.
append(
static_cast<char const*
>(b.data()), buffer_size(b));
283 auto const postResult =
287 if (postResult ==
nullptr)
291 detachedSession->close(
true);
300 auto const size = boost::asio::buffer_size(buffers);
304 jvResult[jss::type] = jss::error;
305 jvResult[jss::error] =
"jsonInvalid";
307 boost::beast::multi_buffer sb;
308 Json::stream(jvResult, [&sb](
auto const p,
auto const n) {
309 sb.commit(boost::asio::buffer_copy(sb.prepare(n), boost::asio::buffer(p, n)));
311 JLOG(
m_journal.
trace()) <<
"Websocket sending '" << jvResult <<
"'";
325 auto const n = s.length();
326 boost::beast::multi_buffer sb(n);
327 sb.commit(boost::asio::buffer_copy(sb.prepare(n), boost::asio::buffer(s.c_str(), n)));
331 if (postResult ==
nullptr)
334 session->close({boost::beast::websocket::going_away,
"Shutting Down"});
359 using namespace std::chrono_literals;
360 auto const level = (duration >= 10s) ? journal.
error() : (duration >= 1s) ? journal.
warn() : journal.
debug();
362 JLOG(level) <<
"RPC request processing duration = "
363 << std::chrono::duration_cast<std::chrono::microseconds>(duration).count()
364 <<
" microseconds. request = " << request;
374 if (is->getConsumer().disconnect(
m_journal))
376 session->close({boost::beast::websocket::policy_error,
"threshold exceeded"});
394 jr[jss::type] = jss::response;
395 jr[jss::status] = jss::error;
397 jr[jss::request] = jv;
399 jr[jss::id] = jv[jss::id];
401 jr[jss::jsonrpc] = jv[jss::jsonrpc];
403 jr[jss::ripplerpc] = jv[jss::ripplerpc];
405 jr[jss::api_version] = jv[jss::api_version];
416 required, session->port(), jv,
beast::IP::from_asio(session->remote_endpoint().address()), is->user());
436 {is->user(), is->forwarded_for()}};
453 is->getConsumer().charge(loadType);
454 if (is->getConsumer().warn())
455 jr[jss::warning] = jss::load;
462 if (jr[jss::result].isMember(jss::error))
464 jr = jr[jss::result];
465 jr[jss::status] = jss::error;
471 if (rq.isMember(jss::passphrase.c_str()))
472 rq[jss::passphrase.c_str()] =
"<masked>";
473 if (rq.isMember(jss::secret.c_str()))
474 rq[jss::secret.c_str()] =
"<masked>";
475 if (rq.isMember(jss::seed.c_str()))
476 rq[jss::seed.c_str()] =
"<masked>";
477 if (rq.isMember(jss::seed_hex.c_str()))
478 rq[jss::seed_hex.c_str()] =
"<masked>";
481 jr[jss::request] = rq;
485 if (jr[jss::result].isMember(
"forwarded") && jr[jss::result][
"forwarded"])
486 jr = jr[jss::result];
487 jr[jss::status] = jss::success;
491 jr[jss::id] = jv[jss::id];
493 jr[jss::jsonrpc] = jv[jss::jsonrpc];
495 jr[jss::ripplerpc] = jv[jss::ripplerpc];
497 jr[jss::api_version] = jv[jss::api_version];
499 jr[jss::type] = jss::response;
510 session->remoteAddress().at_port(0),
515 auto const iter = session->request().find(
"X-User");
516 if (iter != session->request().end())
517 return iter->value();
518 return boost::beast::string_view{};
524 session->close(
true);
532 sub[
"message"] = std::move(message);
544ServerHandler::processRequest(
553 auto rpcJ = app_.journal(
"RPC");
558 if ((request.
size() > RPC::Tuning::maxRequestSize) || !reader.
parse(request, jsonOrig) || !jsonOrig ||
568 if (jsonOrig.
isMember(jss::method) && jsonOrig[jss::method] ==
"batch")
571 if (!jsonOrig.
isMember(jss::params) || !jsonOrig[jss::params].
isArray())
573 HTTPReply(400,
"Malformed batch request", output, rpcJ);
576 size = jsonOrig[jss::params].
size();
581 for (
unsigned i = 0; i < size; ++i)
588 r[jss::request] = jsonRPC;
594 unsigned apiVersion = RPC::apiVersionIfUnspecified;
595 if (jsonRPC.
isMember(jss::params) && jsonRPC[jss::params].
isArray() && jsonRPC[jss::params].
size() > 0 &&
596 jsonRPC[jss::params][0u].
isObject())
598 apiVersion = RPC::getAPIVersionNumber(jsonRPC[jss::params][
Json::UInt(0)], app_.config().BETA_RPC_API);
601 if (apiVersion == RPC::apiVersionIfUnspecified &&
batch)
604 apiVersion = RPC::getAPIVersionNumber(jsonRPC, app_.config().BETA_RPC_API);
607 if (apiVersion == RPC::apiInvalidVersion)
611 HTTPReply(400, jss::invalid_API_version.c_str(), output, rpcJ);
615 r[jss::request] = jsonRPC;
622 auto role = Role::FORBID;
623 auto required = Role::FORBID;
625 required = RPC::roleRequired(apiVersion, app_.config().BETA_RPC_API, jsonRPC[jss::method].
asString());
627 if (jsonRPC.
isMember(jss::params) && jsonRPC[jss::params].
isArray() && jsonRPC[jss::params].
size() > 0 &&
640 usage = m_resourceManager.newUnlimitedEndpoint(remoteIPAddress);
644 usage = m_resourceManager.newInboundEndpoint(remoteIPAddress, role == Role::PROXY,
forwardedFor);
649 HTTPReply(503,
"Server is overloaded", output, rpcJ);
659 if (role == Role::FORBID)
661 usage.
charge(Resource::feeMalformedRPC);
664 HTTPReply(403,
"Forbidden", output, rpcJ);
673 if (!jsonRPC.
isMember(jss::method) || jsonRPC[jss::method].
isNull())
675 usage.
charge(Resource::feeMalformedRPC);
678 HTTPReply(400,
"Null method", output, rpcJ);
690 usage.
charge(Resource::feeMalformedRPC);
693 HTTPReply(400,
"method is not string", output, rpcJ);
703 if (strMethod.
empty())
705 usage.
charge(Resource::feeMalformedRPC);
708 HTTPReply(400,
"method is empty", output, rpcJ);
726 params = jsonRPC[jss::params];
732 usage.
charge(Resource::feeMalformedRPC);
733 HTTPReply(400,
"params unparsable", output, rpcJ);
738 params = std::move(params[0u]);
741 usage.
charge(Resource::feeMalformedRPC);
742 HTTPReply(400,
"params unparsable", output, rpcJ);
753 if (params.
isMember(jss::ripplerpc))
755 if (!params[jss::ripplerpc].isString())
757 usage.
charge(Resource::feeMalformedRPC);
760 HTTPReply(400,
"ripplerpc is not a string", output, rpcJ);
769 ripplerpc = params[jss::ripplerpc].
asString();
776 if (role != Role::IDENTIFIED && role != Role::PROXY)
782 JLOG(m_journal.debug()) <<
"Query: " << strMethod << params;
785 params[jss::command] = strMethod;
786 JLOG(m_journal.trace()) <<
"doRpcCommand:" << strMethod <<
":" << params;
795 app_.getLedgerMaster(),
809 RPC::doCommand(context, result);
815 JLOG(m_journal.error()) <<
"Internal error : " << ex.
what()
826 result[jss::warning] = jss::load;
829 if (ripplerpc >=
"2.0")
833 result[jss::status] = jss::error;
834 result[
"code"] = result[jss::error_code];
835 result[
"message"] = result[jss::error_message];
837 JLOG(m_journal.debug()) <<
"rpcError: " << result[jss::error] <<
": " << result[jss::error_message];
838 r[jss::error] = std::move(result);
842 result[jss::status] = jss::success;
843 r[jss::result] = std::move(result);
856 if (rq.isMember(jss::passphrase.c_str()))
857 rq[jss::passphrase.c_str()] =
"<masked>";
858 if (rq.isMember(jss::secret.c_str()))
859 rq[jss::secret.c_str()] =
"<masked>";
860 if (rq.isMember(jss::seed.c_str()))
861 rq[jss::seed.c_str()] =
"<masked>";
862 if (rq.isMember(jss::seed_hex.c_str()))
863 rq[jss::seed_hex.c_str()] =
"<masked>";
866 result[jss::status] = jss::error;
867 result[jss::request] = rq;
869 JLOG(m_journal.debug()) <<
"rpcError: " << result[jss::error] <<
": " << result[jss::error_message];
873 result[jss::status] = jss::success;
875 r[jss::result] = std::move(result);
879 r[jss::jsonrpc] = params[jss::jsonrpc];
880 if (params.
isMember(jss::ripplerpc))
881 r[jss::ripplerpc] = params[jss::ripplerpc];
883 r[jss::id] = params[jss::id];
885 reply.
append(std::move(r));
887 reply = std::move(r);
889 if (reply.
isMember(jss::result) && reply[jss::result].
isMember(jss::result))
891 reply = reply[jss::result];
894 reply[jss::result][jss::status] = reply[jss::status];
901 int const httpStatus = [&reply]() {
905 reply[jss::ripplerpc].
asString() >=
"3.0")
908 if (reply.
isMember(jss::error) && reply[jss::error].
isMember(jss::error_code) &&
909 reply[jss::error][jss::error_code].
isInt())
911 int const errCode = reply[jss::error][jss::error_code].
asInt();
912 return RPC::error_code_http_status(
static_cast<error_code_i>(errCode));
919 auto response = to_string(reply);
928 if (
auto stream = m_journal.debug())
930 static int const maxSize = 10000;
931 if (response.size() <= maxSize)
932 stream <<
"Reply: " << response;
934 stream <<
"Reply: " << response.substr(0, maxSize);
937 HTTPReply(httpStatus, response, output, rpcJ);
949 using namespace boost::beast::http;
951 response<string_body> msg;
953 if (app_.serverOkay(reason))
955 msg.result(boost::beast::http::status::ok);
956 msg.body() =
"<!DOCTYPE html><html><head><title>" + systemName() +
957 " Test page for rippled</title></head><body><h1>" + systemName() +
958 " Test</h1><p>This page shows rippled http(s) "
959 "connectivity is working.</p></body></html>";
963 msg.result(boost::beast::http::status::internal_server_error);
964 msg.body() =
"<HTML><BODY>Server cannot accept clients: " + reason +
"</BODY></HTML>";
966 msg.version(request.version());
967 msg.
insert(
"Server", BuildInfo::getFullVersionString());
968 msg.insert(
"Content-Type",
"text/html");
969 msg.insert(
"Connection",
"close");
970 msg.prepare_payload();
978ServerHandler::Setup::makeContexts()
980 for (
auto& p : ports)
984 if (p.ssl_key.empty() && p.ssl_cert.empty() && p.ssl_chain.empty())
1004 log <<
"Missing 'ip' in [" << p.
name <<
"]";
1005 Throw<std::exception>();
1011 log <<
"Missing 'port' in [" << p.
name <<
"]";
1012 Throw<std::exception>();
1018 log <<
"Missing 'protocol' in [" << p.
name <<
"]";
1019 Throw<std::exception>();
1047 if (!config.
exists(
"server"))
1049 log <<
"Required section [server] is missing";
1050 Throw<std::exception>();
1058 for (
auto const& name : names)
1060 if (!config.
exists(name))
1062 log <<
"Missing section: [" << name <<
"]";
1063 Throw<std::exception>();
1068 if (name == SECTION_PORT_GRPC)
1078 auto it = result.
begin();
1080 while (it != result.
end())
1082 auto& p = it->protocol;
1086 if (p.erase(
"peer") && p.empty())
1087 it = result.
erase(it);
1099 log <<
"Error: More than one peer protocol configured in [server]";
1100 Throw<std::exception>();
1104 log <<
"Warning: No peer protocol configured";
1114 decltype(setup.
ports)::const_iterator iter;
1115 for (iter = setup.
ports.cbegin(); iter != setup.
ports.cend(); ++iter)
1116 if (iter->protocol.count(
"http") > 0 || iter->protocol.count(
"https") > 0)
1118 if (iter == setup.
ports.cend())
1120 setup.
client.
secure = iter->protocol.count(
"https") > 0;
1123 (iter->ip.is_v6() ?
"::1" :
"127.0.0.1")
1124 : iter->ip.to_string();
1137 setup.
ports.cbegin(), setup.
ports.cend(), [](
Port const& port) { return port.protocol.count(
"peer") != 0; });
1138 if (iter == setup.
ports.cend())
1143 setup.
overlay = {iter->ip, iter->port};
1161 boost::asio::io_context& io_context,
Decorator for streaming out compact json.
Unserialize a JSON document into a Value.
std::string getFormattedErrorMessages() const
Returns a user friendly string that list errors in the parsed document.
bool parse(std::string const &document, Value &root)
Read a Value from a JSON document.
Value & append(Value const &value)
Append value to array at the end.
UInt size() const
Number of values in array or object.
bool isObjectOrNull() const
Value removeMember(char const *key)
Remove and return the named member.
std::string asString() const
Returns the unquoted string value.
bool isNull() const
isNull() tests to see if this field is null.
bool isMember(char const *key) const
Return true if the object has a member named key.
A version-independent IP address and port combination.
A generic endpoint for log messages.
Stream trace() const
Severity stream access functions.
virtual Config & config()=0
virtual LedgerMaster & getLedgerMaster()=0
virtual beast::Journal journal(std::string const &name)=0
virtual Overlay & overlay()=0
virtual NetworkOPs & getOPs()=0
bool exists(std::string const &name) const
Returns true if a section with the given name exists.
Section & section(std::string const &name)
Returns the section with the given name.
Provides the beast::insight::Collector service.
virtual beast::insight::Group::ptr const & group(std::string const &name)=0
A pool of threads to perform work.
std::shared_ptr< Coro > postCoro(JobType t, std::string const &name, F &&f)
Creates a coroutine and adds a job to the queue which will run it.
Provides server functionality for clients.
virtual Handoff onHandoff(std::unique_ptr< stream_type > &&bundle, http_request_type &&request, boost::asio::ip::tcp::endpoint remote_address)=0
Conditionally accept an incoming HTTP request.
An endpoint that consumes resources.
bool warn()
Returns true if the consumer should be warned.
bool disconnect(beast::Journal const &j)
Returns true if the consumer should be disconnected.
Disposition charge(Charge const &fee, std::string const &context={})
Apply a load charge to the consumer.
Tracks load and resource consumption.
std::vector< std::string > const & values() const
Returns all the values in the section.
Resource::Manager & m_resourceManager
std::condition_variable condition_
ServerHandler(ServerHandlerCreator const &, Application &app, boost::asio::io_context &io_context, JobQueue &jobQueue, NetworkOPs &networkOPs, Resource::Manager &resourceManager, CollectorManager &cm)
Handoff onHandoff(Session &session, std::unique_ptr< stream_type > &&bundle, http_request_type &&request, boost::asio::ip::tcp::endpoint const &remote_address)
void onClose(Session &session, boost::system::error_code const &)
Setup const & setup() const
bool onAccept(Session &session, boost::asio::ip::tcp::endpoint endpoint)
beast::insight::Event rpc_size_
Handoff statusResponse(http_request_type const &request) const
void processRequest(Port const &port, std::string const &request, beast::IP::Endpoint const &remoteIPAddress, Output &&, std::shared_ptr< JobQueue::Coro > coro, std::string_view forwardedFor, std::string_view user)
std::map< std::reference_wrapper< Port const >, int > count_
void onRequest(Session &session)
beast::insight::Event rpc_time_
void onWSMessage(std::shared_ptr< WSSession > session, std::vector< boost::asio::const_buffer > const &buffers)
NetworkOPs & m_networkOPs
std::unique_ptr< Server > m_server
beast::insight::Counter rpc_requests_
Json::Value processSession(std::shared_ptr< WSSession > const &session, std::shared_ptr< JobQueue::Coro > const &coro, Json::Value const &jv)
Persistent state information for a connection session.
virtual Port const & port()=0
Returns the Port settings for this connection.
virtual void close(bool graceful)=0
Close the session.
virtual std::shared_ptr< Session > detach()=0
Detach the session.
virtual http_request_type & request()=0
Returns the current HTTP request.
virtual std::shared_ptr< WSSession > websocketUpgrade()=0
Convert the connection to WebSocket.
void write(std::string const &s)
Send a copy of data asynchronously.
void stream(Json::Value const &jv, Write const &write)
Stream compact JSON to the specified function.
@ arrayValue
array value (ordered list)
@ objectValue
object value (collection of name/value pairs).
Endpoint from_asio(boost::asio::ip::address const &address)
Convert to Endpoint.
bool is_unspecified(Address const &addr)
Returns true if the address is unspecified.
bool is_keep_alive(boost::beast::http::message< isRequest, Body, Fields > const &m)
std::string const & getFullVersionString()
Full server version string.
static int constexpr maxRequestSize
static constexpr auto apiInvalidVersion
Role roleRequired(unsigned int version, bool betaEnabled, std::string const &method)
Status doCommand(RPC::JsonContext &context, Json::Value &result)
Execute an RPC command and store the results in a Json::Value.
unsigned int getAPIVersionNumber(Json::Value const &jv, bool betaEnabled)
Retrieve the api version number from the json value.
Json::Value make_error(error_code_i code)
Returns a new json object that reflects the error code.
Charge const feeReferenceRPC
Charge const feeMalformedRPC
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
static std::map< std::string, std::string > build_map(boost::beast::http::fields const &h)
void parse_Port(ParsedPort &port, Section const §ion, std::ostream &log)
void HTTPReply(int nStatus, std::string const &strMsg, Json::Output const &, beast::Journal j)
static std::string buffers_to_string(ConstBufferSequence const &bs)
std::string to_string(base_uint< Bits, Tag > const &a)
static void setup_Client(ServerHandler::Setup &setup)
boost::beast::http::request< boost::beast::http::dynamic_body > http_request_type
std::string base64_decode(std::string_view data)
static std::vector< Port > parse_Ports(Config const &config, std::ostream &log)
Json::Int constexpr wrong_version
std::shared_ptr< boost::asio::ssl::context > make_SSLContext(std::string const &cipherList)
Create a self-signed SSL context that allows anonymous Diffie Hellman.
static bool authorized(Port const &port, std::map< std::string, std::string > const &h)
Role requestRole(Role const &required, Port const &port, Json::Value const ¶ms, beast::IP::Endpoint const &remoteIp, std::string_view user)
Return the allowed privilege role.
Resource::Consumer requestInboundEndpoint(Resource::Manager &manager, beast::IP::Endpoint const &remoteAddress, Role const &role, std::string_view user, std::string_view forwardedFor)
static Json::Value make_json_error(Json::Int code, Json::Value &&message)
std::string_view forwardedFor(http_request_type const &request)
ServerHandler::Setup setup_ServerHandler(Config const &config, std::ostream &&log)
static Port to_Port(ParsedPort const &parsed, std::ostream &log)
std::unique_ptr< ServerHandler > make_ServerHandler(Application &app, boost::asio::io_context &io_context, JobQueue &jobQueue, NetworkOPs &networkOPs, Resource::Manager &resourceManager, CollectorManager &cm)
Json::Int constexpr forbidden
Json::Value rpcError(error_code_i iError)
Json::Int constexpr method_not_found
std::unique_ptr< Server > make_Server(Handler &handler, boost::asio::io_context &io_context, beast::Journal journal)
Create the HTTP server using the specified handler.
Json::Int constexpr server_overloaded
void logDuration(Json::Value const &request, T const &duration, beast::Journal &journal)
Overlay::Setup setup_Overlay(BasicConfig const &config)
bool isUnlimited(Role const &role)
ADMIN and IDENTIFIED roles shall have unlimited resources.
std::shared_ptr< boost::asio::ssl::context > make_SSLContextAuthed(std::string const &keyFile, std::string const &certFile, std::string const &chainFile, std::string const &cipherList)
Create an authenticated SSL context using the specified files.
static Json::Output makeOutput(Session &session)
static bool isStatusRequest(http_request_type const &request)
static Handoff statusRequestResponse(http_request_type const &request, boost::beast::http::status status)
T remove_suffix(T... args)
static IP::Endpoint from_asio(boost::asio::ip::address const &address)
Used to indicate the result of a server connection handoff.
std::shared_ptr< Writer > response
std::set< std::string, boost::beast::iless > protocol
boost::beast::websocket::permessage_deflate pmd_options
std::optional< boost::asio::ip::address > ip
std::vector< boost::asio::ip::network_v6 > secure_gateway_nets_v6
std::string admin_password
std::vector< boost::asio::ip::network_v4 > secure_gateway_nets_v4
std::uint16_t ws_queue_limit
std::vector< boost::asio::ip::network_v4 > admin_nets_v4
std::optional< std::uint16_t > port
std::vector< boost::asio::ip::network_v6 > admin_nets_v6
Configuration information for a Server listening port.
std::vector< boost::asio::ip::network_v4 > admin_nets_v4
std::string admin_password
std::vector< boost::asio::ip::network_v6 > secure_gateway_nets_v6
std::set< std::string, boost::beast::iless > protocol
boost::beast::websocket::permessage_deflate pmd_options
std::uint16_t ws_queue_limit
boost::asio::ip::address ip
std::vector< boost::asio::ip::network_v4 > secure_gateway_nets_v4
std::vector< boost::asio::ip::network_v6 > admin_nets_v6
std::string admin_password
boost::asio::ip::tcp::endpoint overlay
std::vector< Port > ports