use WPAD for proxy auto-detection

Bug #209691 reported by Colin Watson on 2008-03-31
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
choose-mirror (Ubuntu)
Wishlist
Unassigned

Bug Description

Binary package hint: choose-mirror

If WPAD proxy auto-detection is available on the current network, choose-mirror should offer that as an available HTTP proxy.

Colin Watson (cjwatson) wrote :
Changed in choose-mirror:
importance: Undecided → Wishlist
status: New → Triaged
Colin Watson (cjwatson) wrote :

Getting hold of the wpad.dat file is easy enough (a tweak to our dhclient configuration in netcfg to ask for the DHCP option, and some code in choose-mirror that, in the event a proxy is not preseeded, looks at that DHCP option or failing that does a DNS lookup, and then fetches the relevant file).

The interesting quirk here, though, is that WPAD works by delivering a JavaScript file (http://en.wikipedia.org/wiki/Proxy_auto-config) to the client that it's supposed to use to dynamically determine the proxy. Either apt would have to honour this or we'd have to parse it in d-i to work out what to do. In the latter case we would need to decide what should happen in the event that wpad.dat says that (e.g.) archive.ubuntu.com should be proxied but security.ubuntu.com should go direct.

It seems that doing this properly would rely on having apt parse this file. Embedding a full JavaScript interpreter in apt seems ... overkill, though. A bit of web-searching turned up http://code.google.com/p/pacparser/, although further investigation shows that that depends on SpiderMonkey. Would this be a showstopper for use in apt?

Getting this right would be awfully nice for seamless non-network-specific proxy configuration that goes beyond just the web browser.

Michael Vogt (mvo) wrote :

There is also http://code.google.com/p/libproxy/ that seems to be capable of doing this. But I would rather not want to link against it directly. A simple protocol to call external helpers for this discovery would be my prefered solution (or to call a external lib). This would be useful for cdrom location detection as well, I would like to have HAL here without the need to link against dbus and libhal.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers