On Tue, May 06, 2008 at 02:20:09PM +0200, Rafael Garcia-Suarez wrote:
So I was writing a neat proxy.pac to put on my laptop so it could
adjust what web proxy to use depending on my location.

Basically, I wanted to do something like this :

if (isInNet(myIpAddress(), "10.0.0.0", "255.0.0.0")) {
   return "my office's proxy settings";
}
return "DIRECT";

But the function myIpAddress() always returns "127.0.0.1". HOW USEFUL IS THAT.

This is probably the result of a mildly broken OS config, not Firefox.
Assuming you are using some *nix variety, check /etc/hosts.  Most Linux
distributions tend to create a line like

 127.0.0.1 localhost whatever.machine.name.you.chose.on.installation

which might be helpful on a laptop that you frequently move from one
network to another but is unhelpful for a workstation with a fixed
or dhcp-assigned network address.  If you do have such a line in
/etc/hosts, you can fix your problem by simply removing your laptop's
hostname it.

--
Bruce

Remember you're a Womble.

Reply via email to