cURL / Mailing Lists / curl-library / Single Mail


Problem connecting proxy using libcurl

From: Tan Li San <>
Date: Wed, 26 Sep 2001 18:06:02 +0800

Thanks Daniel & Nielsen, the previous problem was resolved after installing
cURL 7.9.

I also encountered problems whenever a http proxy is specified in my
program. The connection seems to "hang" even though i have specified
connecttimeout and timeout. The connection will however goes through
successfully if proxy is omitted.

In my program:

    curl = curl_easy_init();
    curl_easy_setopt(curl, CURLOPT_URL, myURL);
    curl_easy_setopt(curl, CURLOPT_PROXY, myProxy);
    curl_easy_setopt(curl, CURLOPT_PROXYPORT, 8080);
    curl_easy_setopt(curl, CURLOPT_TIMEOUT, 60);
    curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 30);
    res = curl_easy_perform(curl);

When I tried using curl from the command line, the connection goes through
    curl -x

Have I missed out any steps in my program? Please advise. Thanks.
Received on 2001-09-26