Default network config causes issues with automatic proxy wpad files - not sure what to log bug against

Asked by cleary

Hi All,

Long explanation, see further below for the question:

The way ubuntu does it's networking currently is causing some issues with my proxy auto config.
I have a bunch of remote branches, some of these branches have their own internet connection and proxy server, so my wpad.dat file essentially checks what subnet they're coming from via the myIpAddress() function, and returns the correct proxy server accordingly.

The myIpAddress() function as implemented by Unity/Gnome and KDE seems to do a reverse lookup against the /etc/hosts file of the client, and returns which obviously breaks my site detection cases.
I've tried making dns priority over files in /etc/nsswitch.conf, but nothing changes.
The only change that has worked, is to insert a line into /etc/hosts *before* the entry, with my IP address, and hostname eg:

user@myhost:~$ head -n 3 /etc/hosts myhost myhost.fq.dn localhost myhost

This problem affects any browsers/software which reference the system proxy config, eg chromium-browser, google-chrome, konqueror, rekonq (I presume), etc.

I've tested this on Ubuntu 13.10, Kubuntu 13.10, Ubuntu 14.04, Kubuntu 14.04 - both unity and kde proxy managers exhibit the same behaviour.
Interestingly, firefox does *not* exhibit this behaviour if you set it's proxy to auto-detect.

My question is, where do I report this as a bug? Do I put it against Unity/Gnome and KDE? Do I put it against Network Manager? Do I log a bug for all 4 projects and see what sticks?

Thanks -

Example wpad.dat file:
function FindProxyForURL(url, host)

        proxy="PROXY proxy1:3128";

        if (isInNet(myip, "", "")) {
                proxy="PROXY proxy2:3128";

        return proxy;

The output from the alert() function can be accessed using the following url in chrome/chromium:
 -> events debugging interface, which confirms the ip address that the myIpAddress() function resolves.

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :

If you have 2 different network addresses you can setup 2 network profiles in network manager and switch that way. May help

Revision history for this message
actionparsnip (andrew-woodhead666) said :

Personally I'd make a script to run at each site which uses export and Ifconfig to set things

Revision history for this message
cleary (bernard-gray) said :

Thanks for the workaround suggestions folks, I've got my own functional workaround in place already though, and is not related to my question.

This is a bug, my question is: Where do I report it?

Revision history for this message
actionparsnip (andrew-woodhead666) said :

The network manager profiles thing is the fix.

If you want to report a bug then run:

ubuntu-bug network-manager

To start the process

Revision history for this message
cleary (bernard-gray) said :

Network-manager isn't actually parsing the wpad file. It's just providing the underlying networking layer.

Firefox is using the same nm managed networking layer as both KDE and Unity, but evaluates the correct interface for the myIpAddress() function, whereas the DEs I've tested so far (KDE/Unity) do not.

Therefore, network-manager (imo) is not the source of the bug.

Having now laid out the argument, I've probably just answered my own question -