14 "bloomfilter (allow requesting BIP37 filtered blocks and transactions)",
15 "noban (do not ban for misbehavior; implies download)",
16 "forcerelay (relay transactions that are already in the mempool; implies relay)",
17 "relay (relay even in -blocksonly mode, and unlimited transaction announcements)",
18 "mempool (allow requesting BIP35 mempool contents)",
19 "download (allow getheaders during IBD, no disconnect after maxuploadtarget limit)",
20 "addr (responses to GETADDR avoid hitting the cache and contain random records with the most up-to-date info)"
62 error =
_(
"whitebind may only be used for incoming connections (\"out\" was passed)");
80 error =
strprintf(
_(
"Only direction was set, no permissions: '%s'"), str);
94 std::vector<std::string>
strings;
111 const std::string
strBind = str.substr(offset);
112 const std::optional<CService> addrBind{
Lookup(
strBind, 0,
false)};
113 if (!addrBind.has_value()) {
114 error = ResolveErrMsg(
"whitebind",
strBind);
117 if (addrBind.value().GetPort() == 0) {
135 const std::string
net = str.substr(offset);
137 if (!subnet.IsValid()) {
138 error =
strprintf(
_(
"Invalid netmask specified in -whitelist: '%s'"),
net);
NetPermissionFlags m_flags
static void AddFlag(NetPermissionFlags &flags, NetPermissionFlags f)
static std::vector< std::string > ToStrings(NetPermissionFlags flags)
static bool HasFlag(NetPermissionFlags flags, NetPermissionFlags f)
static bool TryParse(const std::string &str, NetWhitebindPermissions &output, bilingual_str &error)
static bool TryParse(const std::string &str, NetWhitelistPermissions &output, ConnectionDirection &output_connection_direction, bilingual_str &error)
is a home for simple string functions returning descriptive messages that are used in RPC and GUI int...
bilingual_str ResolveErrMsg(const std::string &optname, const std::string &strBind)
const std::vector< std::string > NET_PERMISSIONS_DOC
CSubNet LookupSubNet(const std::string &subnet_str)
Parse and resolve a specified subnet string into the appropriate internal representation.
std::vector< CService > Lookup(const std::string &name, uint16_t portDefault, bool fAllowLookup, unsigned int nMaxSolutions, DNSLookupFn dns_lookup_function)
Resolve a service string to its corresponding service.
consteval auto _(util::TranslatedLiteral str)
bilingual_str Untranslated(std::string original)
Mark a bilingual_str as untranslated.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.