dhtrunner: don't setProxyServer in headers

Don't define setProxyServer in headers since it depends on a configuration option
This commit is contained in:
Adrien Béraud committed 2018-06-15 12:18:56 -04:00
1 parent fb6d290692
commit 3dca4db408
2 files changed
+16 -9

No files matched your search

+15
View File
@@ -907,6 +907,21 @@ DhtRunner::activeDht() const
#endif // OPENDHT_PROXY_CLIENT
}
void
DhtRunner::setProxyServer(const std::string& proxy, const std::string& pushNodeId)
{
#if OPENDHT_PROXY_CLIENT
if (config_.proxy_server == proxy and config_.push_node_id == pushNodeId)
return;
config_.proxy_server = proxy;
config_.push_node_id = pushNodeId;
enableProxy(use_proxy and not config_.proxy_server.empty());
#else
if (not proxy.empty())
std::cerr << "DHT proxy requested but OpenDHT built without proxy support." << std::endl;
#endif
}
void
DhtRunner::enableProxy(bool proxify)
{