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 127.0.1.1 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 127.0.1.1 entry, with my IP address, and hostname eg:

user@myhost:~$ head -n 3 /etc/hosts
10.10.90.16 myhost myhost.fq.dn
127.0.0.1 localhost
127.0.1.1 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 -

Appendix:
Example wpad.dat file:
========
function FindProxyForURL(url, host)
{
        myip=myIpAddress();
        alert(myip);

        proxy="PROXY proxy1:3128";

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

        return proxy;
}
========

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

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
cleary
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

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 :
#2

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 :
#3

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 :
#4

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 :
#5

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 -