cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_easy_setopt for SSL proxy

From: nir droid <nirdroid_at_gmail.com>
Date: Mon, 26 Jan 2009 02:22:28 +0200

On Mon, Jan 26, 2009 at 1:30 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Mon, 26 Jan 2009, nir droid wrote:
>
> curl_easy_setopt(CURLOPT_PROXY, "http://1.2.3.4:80")<
>> https://sslproxy.com:8443/>
>> curl_easy_setopt(CURLOPT_PROXY,
>> "https://1.2.3.4:8443")<https://sslproxy.com:8443/>
>>
>> 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.

Sorry for the bad impression; I did read but did not fully understand

>
> 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 now).
>
> 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.
>
> --
>
> / daniel.haxx.se
>

Now I understand, thanks.
Just to clear things, I use the environment variables to set the proxies and
it works fine enough; As a newbie I didn't find any example that refers to
this (quite common) scenario
Received on 2009-01-26