use WPAD for proxy auto-detection

Bug #209691 reported by Colin Watson
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
choose-mirror (Ubuntu)
Triaged
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.

Revision history for this message
Colin Watson (cjwatson) wrote :
Changed in choose-mirror:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
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.

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.