Automatic proxy selection based on network location with Firefox (proxy.pac)
From: Sébastien Pierrel (sebastien.pierrel_at_gmail.com)
Date: 11/30/05
- Previous message: T: "Can't startx in 24b color depth mode"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 30 Nov 2005 01:48:57 +0200 To: debian-user@lists.debian.org
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.
- Previous message: T: "Can't startx in 24b color depth mode"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|