Bug #115487 - automatic proxy discovery problems

Dawit A adawit at kde.org
Wed Jun 2 22:12:43 BST 2010


On Monday, May 31, 2010 06:46:12 Travers Carter wrote:
> Hi,
> 
> I have been looking at bug 11547 regarding automatic proxy discovery (WPAD)
> not working [https://bugs.kde.org/show_bug.cgi?id=115487]

> I believe I've figured why it doesn't work in almost all cases, but one of
> the problems is that kpac_dhcp_helper needs to find the host's IP address
> in order to construct a DHCPINFORM query, presently it uses
> gethostname()+gethostbyname() to try and do this, but it would appear that
> this isn't really all that reliable in practise.

It never was at least not in a portable way and that is probably why even 
Firefox does not support the DHCP based approach for WPAD. At least it did not 
before, no idea if that has changed recently.[1]

> Dan Williams (the NetworkManager maintainer) suggested that
> kpac_dhcp_client should either look up the IP address of the default
> route's interface, or possibly query NetworkManager via D-Bus if it is
> running.

That would assume that NetworkManager is used everywhere you want to do this. 
That will not be the case. For example, it won't work on my machine as I do 
not use NetworkManager.

> See https://bugzilla.gnome.org/show_bug.cgi?id=619931#c2
> 
> 
> As far as I have been able to find there is no portable to look up the
> routing table across OSes.  Under linux it is possible to ask the kernel
> for the relevant entry for a given destination including a preferred
> source address via the netlink(7) interface.  Would a patch implementing
> optional support for this in kpac_dhcp_helper (preferably via libnl -
> http://www.infradead.org/~tgr/libnl/) be considered an acceptable option
> and dependency? is there a better option? obviously it would only help on
> Linux and other OSes would still fall back on
> gethostname()+gethostbyname()

Personally, the DHCPINFORM look-up approach should be completely abandoned as 
an option for doing WPAD just almost all other major browsers (exception being 
IE). That feature should solely rely on the more reliable DNS based auto proxy 
discovery method. Even if you were somehow to come up with a way to do this in 
a semi-portable manner, you will have other issues such as multi-homed 
machines (which interface's ip address to use) etc ; so I rather doubt it is 
worth doing...

[1] http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol

Regards,
Dawit A.




More information about the kde-core-devel mailing list