Skip to content

Commit 4278b1d

Browse files
committed
Clarify error message when invalid -rpcallowip
Also add to HelpMessage() what specifications are valid.
1 parent dd49e92 commit 4278b1d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ std::string HelpMessage(HelpMessageMode mode)
323323
strUsage += " -rpcuser=<user> " + _("Username for JSON-RPC connections") + "\n";
324324
strUsage += " -rpcpassword=<pw> " + _("Password for JSON-RPC connections") + "\n";
325325
strUsage += " -rpcport=<port> " + _("Listen for JSON-RPC connections on <port> (default: 8332 or testnet: 18332)") + "\n";
326-
strUsage += " -rpcallowip=<ip> " + _("Allow JSON-RPC connections from specified IP address. This option can be specified multiple times") + "\n";
326+
strUsage += " -rpcallowip=<ip> " + _("Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times") + "\n";
327327
strUsage += " -rpcthreads=<n> " + _("Set the number of threads to service RPC calls (default: 4)") + "\n";
328328

329329
strUsage += "\n" + _("RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n";

src/rpcserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ void StartRPCThreads()
512512
if(!subnet.IsValid())
513513
{
514514
uiInterface.ThreadSafeMessageBox(
515-
strprintf("Invalid -rpcallowip subnet specification: %s", strAllow),
515+
strprintf("Invalid -rpcallowip subnet specification: %s. Valid are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24).", strAllow),
516516
"", CClientUIInterface::MSG_ERROR);
517517
StartShutdown();
518518
return;

0 commit comments

Comments
 (0)