cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Test proxy authentication parameters

From: Andrey Bocharnikov <ricko.x_at_gmail.com>
Date: Thu, 30 Sep 2010 11:24:30 +0700

On Thu, Sep 30, 2010 at 5:04 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Tue, 28 Sep 2010, Andrey Bocharnikov wrote:
>
> Is it possible to make authentication on proxy, without further requests
>> through this proxy?
>>
>
> If you talk regular HTTP and a HTTP proxy, you authenticate to the proxy by
> doing a request to/through it. And no, you don't need to do any further
> requests using that proxy after that.
>
>
> 1) Connecting directly to proxy server URL with CURLOPT_URL option
>> (without
>> using proxy server - CURLOPT_PROXY option) with specified authentication
>> parameters.
>> Proxy replies ERR_INVALID_URL.
>>
>
> The proxy doesn't necessarily respond as a server. It is a proxy so you
> need to talk proxy language to it.
>
>
> If I set CONNECT_ONLY option additionally, it just establish connection
>> with
>> proxy without authentication. So i can't understand if authentication
>> parameters are correct.
>>
>
> CONNECT_ONLY would apply to the connection to the end point, which isn't
> the proxy. The proxy is just a ... eh proxy, a middle man. It can't be a
> middle if there's no end point on the other side of the proxy that you're
> reaching out to.
>
>
> 2) Connecting to some server like "always.alive.server.com" with
>> specified
>> proxy and CONNECT_ONLY option. But in this case there is also no
>> authentication happened.
>>
>
> You need to set CURLOPT_PROXYAUTH with your prefered auth methods and you
> should probably not use CONNECT_ONLY.
>
> Actually I set NTLM authentication (also tryied basic). And there was no
authentication when I'm using CONNECT_ONLY.
I'm not sure if this is a bug, but documentation tells about this option:
"...perform all the required proxy authentication and connection setup, but
no data transfer."

> So general question: is it possible to authenticate on proxy without
>> request to another URL?
>>
>
> Not if you're talking about a HTTP proxy. There's no separate
> authentication with a proxy then.
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

Thank you for such comprehensive reply. It makes things clear.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-30