|
|
|
@ -164,10 +164,11 @@ namespace llarp
|
|
|
|
|
"network", "strict-connect", false, "", AssignmentAcceptor(m_strictConnect));
|
|
|
|
|
|
|
|
|
|
// TODO: make sure this is documented... what does it mean though?
|
|
|
|
|
conf.addUndeclaredHandler("network", [&](std::string_view, std::string_view name, std::string_view value) {
|
|
|
|
|
m_options.emplace(name, value);
|
|
|
|
|
return true;
|
|
|
|
|
});
|
|
|
|
|
conf.addUndeclaredHandler(
|
|
|
|
|
"network", [&](std::string_view, std::string_view name, std::string_view value) {
|
|
|
|
|
m_options.emplace(name, value);
|
|
|
|
|
return true;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
@ -236,16 +237,18 @@ namespace llarp
|
|
|
|
|
m_OutboundLink = LinkInfoFromINIValues("*", arg);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
conf.addUndeclaredHandler("bind", [&](std::string_view, std::string_view name, std::string_view value) {
|
|
|
|
|
LinkInfo info = LinkInfoFromINIValues(name, value);
|
|
|
|
|
conf.addUndeclaredHandler(
|
|
|
|
|
"bind", [&](std::string_view, std::string_view name, std::string_view value) {
|
|
|
|
|
LinkInfo info = LinkInfoFromINIValues(name, value);
|
|
|
|
|
|
|
|
|
|
if (info.port <= 0)
|
|
|
|
|
throw std::invalid_argument(stringify("Invalid [bind] port specified on interface", name));
|
|
|
|
|
if (info.port <= 0)
|
|
|
|
|
throw std::invalid_argument(
|
|
|
|
|
stringify("Invalid [bind] port specified on interface", name));
|
|
|
|
|
|
|
|
|
|
assert(name != "*"); // handled by defineOption("bind", "*", ...) above
|
|
|
|
|
assert(name != "*"); // handled by defineOption("bind", "*", ...) above
|
|
|
|
|
|
|
|
|
|
m_InboundLinks.emplace_back(std::move(info));
|
|
|
|
|
});
|
|
|
|
|
m_InboundLinks.emplace_back(std::move(info));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
@ -277,7 +280,8 @@ namespace llarp
|
|
|
|
|
(void)params;
|
|
|
|
|
|
|
|
|
|
conf.addUndeclaredHandler(
|
|
|
|
|
"services", [this](std::string_view section, std::string_view name, std::string_view value) {
|
|
|
|
|
"services",
|
|
|
|
|
[this](std::string_view section, std::string_view name, std::string_view value) {
|
|
|
|
|
(void)section;
|
|
|
|
|
services.emplace_back(name, value);
|
|
|
|
|
return true;
|
|
|
|
@ -422,15 +426,16 @@ namespace llarp
|
|
|
|
|
m_mapAddr = arg;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
conf.addUndeclaredHandler("snapp", [&](std::string_view, std::string_view name, std::string_view value) {
|
|
|
|
|
if (name == "blacklist-snode")
|
|
|
|
|
{
|
|
|
|
|
m_snodeBlacklist.push_back(str(value));
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
conf.addUndeclaredHandler(
|
|
|
|
|
"snapp", [&](std::string_view, std::string_view name, std::string_view value) {
|
|
|
|
|
if (name == "blacklist-snode")
|
|
|
|
|
{
|
|
|
|
|
m_snodeBlacklist.push_back(str(value));
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool
|
|
|
|
|