[Server-devel] Proxy auto-configuration

Andrew McMillan andrew at morphoss.com
Sat Nov 28 18:15:18 EST 2009


On Sat, 2009-11-28 at 15:47 +0000, Tomeu Vizoso wrote:
> On Sat, Nov 28, 2009 at 14:54, Sascha Silbe
> <sascha-ml-ui-sugar-olpc-devel at silbe.org> wrote:
> > On Sat, Nov 28, 2009 at 03:41:22PM +0100, Martin Langhoff wrote:
> >
> >> - The DHCP payload must contain a url to the PAC file - this is the
> >> WPAD protocol, and what Pia was playing with.
> >
> > Sure, but for that the browser must send a DHCP request, which it doesn't
> > seem to do. Or does Fedora contain any support for that in the DHCP client
> > (for Debian, I don't see it)?
> >
> >> I did find an old email that indicated that she was using Firefox, not
> >> Browse.xo.
> >
> > OK, so it should work with Iceweasel. Either it got disabled (upstream?
> > Debian?) or there was some kind of configuration (dhclient? Firefox?) to
> > enable it...
> 
> From these links, looks like Mozilla uses WPAD through DNS (and not DHCP):
> 
> http://mxr.mozilla.org/mozilla-central/search?string=wpad&find=&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central
> 
> http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol

Hi,

I run WPAD here with Mozilla, and it works well.  It will generally be
through DNS since that's the more reliable way of finding it, but it
does require the browser to make a check for it.

Firefox, IE & Safari have support for it, and in all cases the option is
called something like 'proxy autoconfiguration' or 'autoconfiguration'.
I don't know about Browse.xo, however.  I suspect not.

It could also be done through DHCP through a post DHCP hook which took
the data and overwrote something within the web browser's configuration,
assuming you're using a fully-featured DHCP client which allowed for
such post hooks - the ISC dhcp client does support this.

Note that the configuration from DHCP still doesn't supply the proxy
address, but only the address of the javascript which must be run
against each request to calculate the proxy address.

For example here I run two proxies, and for some addresses one is a
better choice than the other, so the javascript makes that calculation
and returns the proxy for this particular request.

If Browse.xo supports manually configuring a proxy, and if your wpad was
a very simple 'there is always one proxy' javascript, then perhaps a
post DHCP hook could request the WPAD file, crudely parse it for the
real proxy address and stuff that into the Browse.xo configuration.

Regards,
					Andrew McMillan.

------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com                            +64(272)DEBIAN
 What I tell you three times is true.
                -- Lewis Carroll
------------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.laptop.org/pipermail/devel/attachments/20091129/90a4c1bb/attachment.sig>


More information about the Devel mailing list