Skip to content
Snippets Groups Projects
Commit 233301c3 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

dhtrunner: use proxy by default if configured

parent 0db21772
No related branches found
No related tags found
No related merge requests found
......@@ -383,7 +383,7 @@ public:
return;
config_.proxy_server = proxy;
config_.push_node_id = pushNodeId;
enableProxy(use_proxy);
enableProxy(use_proxy and not config_.proxy_server.empty());
}
/**
......
......@@ -91,10 +91,8 @@ DhtRunner::run(const SockAddr& local4, const SockAddr& local6, DhtRunner::Config
dht_ = std::unique_ptr<SecureDht>(new SecureDht(std::move(dht), config.dht_config));
#if OPENDHT_PROXY_CLIENT
if (!dht_via_proxy_) {
config_ = config;
enableProxy(use_proxy);
}
enableProxy(not config_.proxy_server.empty());
#endif
running = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment