diff options
author | anon <anon [at] nowhere> | 2021-03-18 20:50:21 +0000 |
---|---|---|
committer | tobtoht <thotbot@protonmail.com> | 2021-08-20 21:24:29 +0200 |
commit | 4ced092aae04e5a6789e94b68a07c74e653cd869 (patch) | |
tree | 8b298bd88ae5bcdf88eaa3e8a7c510b527d56d91 /src/daemon/core.h | |
parent | Merge pull request #7735 (diff) | |
download | monero-4ced092aae04e5a6789e94b68a07c74e653cd869.tar.xz |
daemon: allow proxy configuration
Co-authored-by: selsta <selsta@sent.at>
Co-authored-by: tobtoht <thotbot@protonmail.com>
Diffstat (limited to 'src/daemon/core.h')
-rw-r--r-- | src/daemon/core.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/daemon/core.h b/src/daemon/core.h index 804d7474d..0811cf420 100644 --- a/src/daemon/core.h +++ b/src/daemon/core.h @@ -32,6 +32,7 @@ #include "cryptonote_core/cryptonote_core.h" #include "cryptonote_protocol/cryptonote_protocol_handler.h" #include "misc_log_ex.h" +#include "daemon/command_line_args.h" #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "daemon" @@ -66,7 +67,14 @@ public: #else const cryptonote::GetCheckpointsCallback& get_checkpoints = nullptr; #endif - if (!m_core.init(m_vm_HACK, nullptr, get_checkpoints)) + + if (command_line::is_arg_defaulted(vm, daemon_args::arg_proxy) && command_line::get_arg(vm, daemon_args::arg_proxy_allow_dns_leaks)) { + MLOG_RED(el::Level::Warning, "--" << daemon_args::arg_proxy_allow_dns_leaks.name << " is enabled, but --" + << daemon_args::arg_proxy.name << " is not specified."); + } + + const bool allow_dns = command_line::is_arg_defaulted(vm, daemon_args::arg_proxy) || command_line::get_arg(vm, daemon_args::arg_proxy_allow_dns_leaks); + if (!m_core.init(m_vm_HACK, nullptr, get_checkpoints, allow_dns)) { throw std::runtime_error("Failed to initialize core"); } |