Allow environment-defined tunnelling HTTP proxies

This commit is contained in:
pooler 2014-04-16 10:47:22 +02:00
parent 42a002c741
commit f167b2b07b

3
util.c
View file

@ -767,9 +767,8 @@ bool stratum_connect(struct stratum_ctx *sctx, const char *url)
if (opt_proxy) {
curl_easy_setopt(curl, CURLOPT_PROXY, opt_proxy);
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, opt_proxy_type);
if (opt_proxy_type == CURLPROXY_HTTP)
curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1);
}
curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1);
#if LIBCURL_VERSION_NUM >= 0x070f06
curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_keepalive_cb);
#endif