Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 694 Lines • ▼ Show 20 Lines | #endif | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-torcontrol=<ip>:<port>", | "-torcontrol=<ip>:<port>", | ||||
strprintf( | strprintf( | ||||
"Tor control port to use if onion listening enabled (default: %s)", | "Tor control port to use if onion listening enabled (default: %s)", | ||||
DEFAULT_TOR_CONTROL), | DEFAULT_TOR_CONTROL), | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-torpassword=<pass>", | gArgs.AddArg("-torpassword=<pass>", | ||||
"Tor control port password (default: empty)", | "Tor control port password (default: empty)", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY | ArgsManager::SENSITIVE, | ||||
OptionsCategory::CONNECTION); | |||||
#ifdef USE_UPNP | #ifdef USE_UPNP | ||||
#if USE_UPNP | #if USE_UPNP | ||||
gArgs.AddArg("-upnp", | gArgs.AddArg("-upnp", | ||||
"Use UPnP to map the listening port (default: 1 when " | "Use UPnP to map the listening port (default: 1 when " | ||||
"listening and no -proxy)", | "listening and no -proxy)", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); | ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); | ||||
#else | #else | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
▲ Show 20 Lines • Show All 317 Lines • ▼ Show 20 Lines | #endif | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-rpcbind=<addr>[:port]", | "-rpcbind=<addr>[:port]", | ||||
"Bind to given address to listen for JSON-RPC connections. Do not " | "Bind to given address to listen for JSON-RPC connections. Do not " | ||||
"expose the RPC server to untrusted networks such as the public " | "expose the RPC server to untrusted networks such as the public " | ||||
"internet! This option is ignored unless -rpcallowip is also passed. " | "internet! This option is ignored unless -rpcallowip is also passed. " | ||||
"Port is optional and overrides -rpcport. Use [host]:port notation " | "Port is optional and overrides -rpcport. Use [host]:port notation " | ||||
"for IPv6. This option can be specified multiple times (default: " | "for IPv6. This option can be specified multiple times (default: " | ||||
"127.0.0.1 and ::1 i.e., localhost)", | "127.0.0.1 and ::1 i.e., localhost)", | ||||
ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, | ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY | | ||||
ArgsManager::SENSITIVE, | |||||
OptionsCategory::RPC); | OptionsCategory::RPC); | ||||
gArgs.AddArg("-rpccookiefile=<loc>", | gArgs.AddArg("-rpccookiefile=<loc>", | ||||
"Location of the auth cookie. Relative paths will be prefixed " | "Location of the auth cookie. Relative paths will be prefixed " | ||||
"by a net-specific datadir location. (default: data dir)", | "by a net-specific datadir location. (default: data dir)", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, OptionsCategory::RPC); | ||||
gArgs.AddArg("-rpcuser=<user>", "Username for JSON-RPC connections", | gArgs.AddArg("-rpcuser=<user>", "Username for JSON-RPC connections", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY | ArgsManager::SENSITIVE, | ||||
OptionsCategory::RPC); | |||||
gArgs.AddArg("-rpcpassword=<pw>", "Password for JSON-RPC connections", | gArgs.AddArg("-rpcpassword=<pw>", "Password for JSON-RPC connections", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY | ArgsManager::SENSITIVE, | ||||
OptionsCategory::RPC); | |||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-rpcwhitelist=<whitelist>", | "-rpcwhitelist=<whitelist>", | ||||
"Set a whitelist to filter incoming RPC calls for a specific user. The " | "Set a whitelist to filter incoming RPC calls for a specific user. The " | ||||
"field <whitelist> comes in the format: <USERNAME>:<rpc 1>,<rpc " | "field <whitelist> comes in the format: <USERNAME>:<rpc 1>,<rpc " | ||||
"2>,...,<rpc n>. If multiple whitelists are set for a given user, they " | "2>,...,<rpc n>. If multiple whitelists are set for a given user, they " | ||||
"are set-intersected. See -rpcwhitelistdefault documentation for " | "are set-intersected. See -rpcwhitelistdefault documentation for " | ||||
"information on default whitelist behavior.", | "information on default whitelist behavior.", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY, OptionsCategory::RPC); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-rpcwhitelistdefault", | "-rpcwhitelistdefault", | ||||
"Sets default behavior for rpc whitelisting. Unless " | "Sets default behavior for rpc whitelisting. Unless " | ||||
"rpcwhitelistdefault is set to 0, if any -rpcwhitelist is set, the rpc " | "rpcwhitelistdefault is set to 0, if any -rpcwhitelist is set, the rpc " | ||||
"server acts as if all rpc users are subject to " | "server acts as if all rpc users are subject to " | ||||
"empty-unless-otherwise-specified whitelists. If rpcwhitelistdefault " | "empty-unless-otherwise-specified whitelists. If rpcwhitelistdefault " | ||||
"is set to 1 and no -rpcwhitelist is set, rpc server acts as if all " | "is set to 1 and no -rpcwhitelist is set, rpc server acts as if all " | ||||
"rpc users are subject to empty whitelists.", | "rpc users are subject to empty whitelists.", | ||||
ArgsManager::ALLOW_BOOL, OptionsCategory::RPC); | ArgsManager::ALLOW_BOOL, OptionsCategory::RPC); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-rpcauth=<userpw>", | "-rpcauth=<userpw>", | ||||
"Username and hashed password for JSON-RPC connections. The field " | "Username and hashed password for JSON-RPC connections. The field " | ||||
"<userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical " | "<userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical " | ||||
"python script is included in share/rpcauth. The client then connects " | "python script is included in share/rpcauth. The client then connects " | ||||
"normally using the rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of " | "normally using the rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of " | ||||
"arguments. This option can be specified multiple times", | "arguments. This option can be specified multiple times", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::RPC); | ArgsManager::ALLOW_ANY | ArgsManager::SENSITIVE, OptionsCategory::RPC); | ||||
gArgs.AddArg("-rpcport=<port>", | gArgs.AddArg("-rpcport=<port>", | ||||
strprintf("Listen for JSON-RPC connections on <port> " | strprintf("Listen for JSON-RPC connections on <port> " | ||||
"(default: %u, testnet: %u, regtest: %u)", | "(default: %u, testnet: %u, regtest: %u)", | ||||
defaultBaseParams->RPCPort(), | defaultBaseParams->RPCPort(), | ||||
testnetBaseParams->RPCPort(), | testnetBaseParams->RPCPort(), | ||||
regtestBaseParams->RPCPort()), | regtestBaseParams->RPCPort()), | ||||
ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, | ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, | ||||
OptionsCategory::RPC); | OptionsCategory::RPC); | ||||
▲ Show 20 Lines • Show All 911 Lines • ▼ Show 20 Lines | if (fs::exists(config_file_path)) { | ||||
strprintf(_("The specified config file %s does not exist\n"), | strprintf(_("The specified config file %s does not exist\n"), | ||||
config_file_path.string())); | config_file_path.string())); | ||||
} else { | } else { | ||||
// Not categorizing as "Warning" because it's the default behavior | // Not categorizing as "Warning" because it's the default behavior | ||||
LogPrintf("Config file: %s (not found, skipping)\n", | LogPrintf("Config file: %s (not found, skipping)\n", | ||||
config_file_path.string()); | config_file_path.string()); | ||||
} | } | ||||
// Log the config arguments to debug.log | |||||
gArgs.LogArgs(); | |||||
LogPrintf("Using at most %i automatic connections (%i file descriptors " | LogPrintf("Using at most %i automatic connections (%i file descriptors " | ||||
"available)\n", | "available)\n", | ||||
nMaxConnections, nFD); | nMaxConnections, nFD); | ||||
// Warn about relative -datadir path. | // Warn about relative -datadir path. | ||||
if (gArgs.IsArgSet("-datadir") && | if (gArgs.IsArgSet("-datadir") && | ||||
!fs::path(gArgs.GetArg("-datadir", "")).is_absolute()) { | !fs::path(gArgs.GetArg("-datadir", "")).is_absolute()) { | ||||
LogPrintf("Warning: relative datadir option '%s' specified, which will " | LogPrintf("Warning: relative datadir option '%s' specified, which will " | ||||
▲ Show 20 Lines • Show All 636 Lines • Show Last 20 Lines |