[opensuse-factory] Curl (and thus zypper) and proxy auto configuration scripts

Hello, in our company, for Internet Explorer, Firefox and the like, we have setup a proxy autoconfiguration script (proxy.pac) to have centralized management of how browsers connect and what proxy they use, including possible exception rules. Can such a PAC also be used by curl? So far I did not find anything that seems to work (in fact it might be a bit to complex for curl, as a PAC is a JS file... and thus ajavascript engine would be required). But it would be very handy to have this feature.. and maybe I'm just missing out on how to set things up? Otherwise: do you think an enhancement request has any value to get added at a future point? Dominique --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

On Thu, Mar 06, 2008 at 04:16:54 +0100, Dominique Leuenberger wrote:
Yes, that would be an interesting feature. Linux is a bit lacking here. But it can be very convienient because the client could automatically know thata proxy.pac rules file exists, and the info as such can already be propagated by the DHCP client. As you say, it would requite a javascript interpreter, but it would be useful. A minimalistic approach might do. Peter -- "WARNING: This bug is visible to non-employees. Please be respectful!" SUSE LINUX Products GmbH Research & Development

Indeed, some more flexibility and usage of established tools can never hurt. It's a pitty that I can set such things in FireFox, but then for zypper (curl) I need to fiddle with some other config parameters.... communicating the url to the proxy pac is rather easy, and as it's a http:// all user somehow even 'understand' it (well: of course not.. but they believe). Maybe some more discussions, also with libcurl authors can bring some light to the end of the tunnel. Dominique PS: Peter, whenever I reply to one of your mails, the reply format is completely borken and the quoting char (>) is not added. Is this a known feature of my client (being Groupwise) or of yours? I for myself hate it ;) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

Hi Dominique, On Thu, Mar 06, 2008 at 05:06:52 +0100, Dominique Leuenberger wrote:
Another approach would be a local proxy, which uses upstream proxies according to proxy.pac. That would mean that no existing commandline too, installer, browser, HTTP library would need to know about it, and none of them would need to be adapted, or link to anything. They would just use the local proxy. The proxy would act as a simple forward proxy (passing requests through) if there is no proxy.pac file in use. Maybe there even already is a squid with libproxy extension? Don't know.
I'm not sure -- I use mutt, and I didn't do anything particular to your mail, except wrapping the long lines. Sorry about that :-) Peter -- "WARNING: This bug is visible to non-employees. Please be respectful!" SUSE LINUX Products GmbH Research & Development

Dominique Leuenberger wrote:
Can such a PAC also be used by curl? So far I did not find anything that seems to work
There was some discussion (*) about making (lib)curl use a library called libproxy that can make use of pac files among other fancy stuff, but there has been no outcome so far...
(in fact it might be a bit to complex for curl, as a PAC is a JS file... and thus ajavascript engine would be required).
... partly for this reason. (*) http://curl.haxx.se/mail/lib-2007-12/index.html#191 http://curl.haxx.se/mail/lib-2007-12/index.html#245 Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

Thanks... very interesting to read... so as go a bit through the thread, the basic conclusion (as also stated in [0] is, that applications should do the magic and not rely on libcurl doing it... well... it's a library and can thus be linked as an optional feature to several things like zypper and the like. I see the point of the authors of libcurl, not willing to just have libcurl act different and start to detect settings that were not here... but then, the best approach there would be to have a setting in the curl config, telling that it should be used.. does not sound that fancy... anyhow, libproxy would need some configuration as well, like I have to define in our setup where the PAC file is (we do not (yet) distribute it via DHCP) I'll read a bit more... Dominique --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

Dominique Leuenberger wrote:
Actually, as far as I remenber, Daniel wasn't opposed to the idea of adding libproxy support to _curl_ (the command-line tool) and yes, curl can be configured in ~/.curlrc. There's no config for the libcurl library. Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
participants (3)
-
Dominique Leuenberger
-
Dr. Peter Poeml
-
Michal Marek