cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Proxy support - Mac and Windows

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 28 Aug 2007 15:49:18 -0700

On Tue, Aug 28, 2007 at 02:44:07PM -0700, Matthew Veenstra wrote:
> We need to have it since we are shipping consumer applications and they just
> need to work as best as possible.  We do only need Mac and Windows, so I don't
> know much on how various linux distros store this kind of information.  

Passing the proxy information in environment variables (e.g. http_proxy)
seems to be the most portable way, and that's already supported by libcurl.
Each distro probably also has a global configuration file somewhere, and
KDE, GNOME and Mozilla would have their own, separate ways, I'm sure. It
would probably be a lot of work to get it working everywhere, and even more
keeping it working through newer revisions.

> Determining if a .pac file exists and using this is a big job to do properly. 
> If we do this, we will most likely use the local javascript engine on the users
> machine to parse this.  So on Windows we would use IE, on the Mac we would use
> WebKit, and for compatibility and embedded systems we would implement the same
> thing in SpikerMonkey.  If we decide we can accept the 1mb of code for
> spidermonkey in our application we may consider just using and embedding
> this.  
>
> Has anyone considered implementing the autoproxy part before?  I just no know
> way but to use a full javascript engine to do this properly. 

I implemented the WPAD spec (at least a subset of it) in an embedded
product once. WPAD can automatically determine whether a proxy autoconfig
file exists for a network, but it doesn't actually specify the format
of the proxy configuration file. I decided to use the easily parsed
application/x-internet-signup file type (an Internet Explorer .ini-style
file format) to extract the proxy information (no Javascript required).
That worked great for the closed system I was targetting, but wouldn't
work in the wild where autoconfig proxy files always seem to be of the
application/x-ns-proxy-autoconfig type.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-08-29