cURL / Mailing Lists / curl-library / Single Mail


Re: curl_easy_setopt for SSL proxy

From: Daniel Stenberg <>
Date: Mon, 26 Jan 2009 00:30:24 +0100 (CET)

On Mon, 26 Jan 2009, nir droid wrote:

> curl_easy_setopt(CURLOPT_PROXY, "")<>
> curl_easy_setopt(CURLOPT_PROXY,
> "")<>
> doesn't #2 runs over #1?
> there are many http urls that redirect to htts page (usually login page), so
> if you use proxy, you need both http and https proxy

No I don't "prefer" that way either since it doesn't work.

You clearly didn't read my explanation of how this works, or Craig West's
explanation of what he'd like to do and I would agree that it seems like a
good thing to provide.

In current and past libcurl versions however you specify the proxy to use and
then the URL that will go over that specified proxy - basically whatever the
protocol is. (There's an additional complexity added by the fact that libcurl
also supports the "standard" environment variables but I'll ignore that for

If you need to do more advanced stuff for redirects that what libcurl
supports, the fix is generally to not use libcurl's automatic following but
instead do it yourself. By using CURLINFO_REDIRECT_URL, that's not even hard
or a lot of work.

Received on 2009-01-26