Automatic proxy selection based on network location with Firefox (proxy.pac)
Hi all,
I'm tired of changing my proxy settings everytime I move to a
different network with my laptop. Therefore, I'm writting an automated
script (proxy.pac):
----------------------------------8<-----------------------------------
function FindProxyForURL(url, host)
{
var company_net = "x.x.x.x";
var company_mask = "255.255.255.0";
if(isInNet(myIpAddress(), company_net, company_mask)) {
return "PROXY proxy.company.com:8080;";
}
return "DIRECT;";
}
----------------------------------8<-----------------------------------
well, the actual script is a *little* more complicated but this is
just enough to illustrate my problem:
isInNet(myIpAddress() always returns the loopback address (127.0.0.1)
Is that a bug from firefox? (Debian package 1.0.7-1)
How could I possibly check other interfaces' address? (lan, wlan, ppp...)
Thx,
/Seb.
Reply to: