curl-library
Re: [ANN] libproxy 0.2
Date: Thu, 20 Dec 2007 17:46:38 -0500
Daniel Stenberg wrote:
> On Thu, 20 Dec 2007, Alex Panait wrote:
>
> Just again, don't take me wrong on this. I really like the concept and
> idea of this new library.
>
>> Currently, libcurl can use proxies that are manually passed into
>> libcurl via the api. This should not change. However, if no option
>> is passed, libcurl falls back to detecting the environment variable.
>> Instead of this behavior, fall back onto libproxy. libproxy can use
>> environment variables, so no compatibility is lost.
>
> Right, if libproxy supports the same variables the same way, no
> current functionality would be lost...
>
>> However, you gain the ability to read configuration from GNOME or KDE
>> (Mac & Windows soon to come) and to perform autodetection and adjust
>> to changing network topology.
>
> But I would really not hit application developers with this in their
> heads. libcurl would all of a sudden scan around the system to figure
> out proxy details (and in the case it is a remote PAC, it would even
> have to actually fetch a remote file), details that it would need to
> search for every time you create/init a new libcurl handle to make a
> new request - just another reason it makes sense to do this outside of
> libcurl.
>
> If we would support this library within libcurl, I would still want an
> option that explicitly asks libcurl to attempt to autodetect a proxy
> to use, so that existing apps won't break or start behaving funnily.
> Then also, if there are more than one proxy returned from libproxy,
> won't the app author want the ability to perhaps pick the one sh/she
> prefers most? That too would require further API fluff to get added to
> libcurl.
>
>> It seems more reasonable to make such a change at the root of the
>> dependency tree, rather than along the branches. Aside from a couple
>> of hours of coding there is nothing to lose and a lot to gain.
>
> I'm voicing my scepticism, although of course some people would call
> me old and grumpy... I'm all ears for further input from others on
> this topic.
>
> BTW, there aren't any docs for the libproxy API and its configure
> didn't finish okey on my box (and I found no docs describing
> prerequisites etc). I'd say it it's not release-material just yet...
>
I like the way libcurl is right now. If any of the auto-detection of
proxy configuration is to be done, it should be done in application
level, e.g. *MyApplication* should include the auto-detection of proxy
instead of doing everything through libcurl.
My 2cents anyway.
Wei
Received on 2007-12-21