[plug] Auto-proxy configuration on Linux clients

Ryan ryan at is.as.geeky.as
Tue Aug 12 16:31:15 WST 2003


Howdy PLUG,

Does anyone know why _ANY_ version of Mozilla, Opera or IE(wine) I have
running on Debian ignores what it is told in the 'Automatic proxy
configuration' bits?

If I enter in the details and click 'Reload' it hits the server and
retrieves the .pac file (200 status logged by apache), but then seems to
ignore and it and go DIRECT.  

Mozilla, Opera and IE on Windows all work fine with it.

If my proxy.pac file is somehow Debian incompatible, I'll dump it here
so you can correct me :)  I've tried several things from here:
http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html,
currently the following works fine for all Window's browsers.

function FindProxyForURL(url, host)
  {
    if (isInNet(myIpAddress(), "10.2.0.0", "255.255.0.0"))
      return "PROXY 10.2.0.4:3128";
    else
      return "DIRECT";
  }

I've tried making the DIRECT a host etc to see what it does and it has
NO effect at all on the browsers, so it appears as if it is completely
ignored.

Something I'm missing?  I've tried dodging up a little javascript thing
to see what myIPAddress() is returning, but it seems to be inherited
from something I can't find and won't work out of the scope of whatever
environment the auto proxy retriever in web browsers use.  I don't grok
javascript though, so it could be me.  Can anyone magic up a way to
check what that function returns?

It DOES work on all Windows browsers so I was thinking that it wasn't
picking up the correct IP on the Debian box.  It has this to choose
from:

vaio:/home/ryan# ifconfig | grep -B1 inet
eth0      Link encap:Ethernet  HWaddr 08:00:46:68:15:31
          inet addr:10.2.0.62  Bcast:10.2.255.255  Mask:255.255.0.0
--
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0

I've also set the 'AddType application/x-ns-proxy-autoconfig .pac' in
Apache incase Mozilla was getting the wrong content type and throwing
the data away (even though other browsers faulter too).

Any thoughts?

Thanks,

Ryan




More information about the plug mailing list