Gentoo Archives: gentoo-user

From: Benjamin Graf <bdgraf@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] auto proxy config (Firefox, and more)
Date: Mon, 24 Sep 2007 16:40:45
Message-Id: 80c705030709240926n4ac683d9j2db3137336fcf189@mail.gmail.com
1 Hi,
2 I'm using my notebook in the school (via Wi-Fi + Cisco VPN) and at
3 home. At school I need a proxy, but not at home.
4
5 I tried this as a proxy automatic configuration file (*.pac), but it
6 doesn't work :
7
8 function FindProxyForURL(url, host)
9 {
10 if (myIpAddress().substring(0,7) == "192.168") {
11 return "DIRECT";
12 }
13 else {
14 if (isPlainHostName(host) ||
15 dnsDomainIs(host, ".he-arc.ch") ||
16 dnsDomainIs(host, ".eiaj.ch") ||
17 dnsDomainIs(host, ".heaa-ne.ch") ||
18 dnsDomainIs(host, ".hegne.ch") ||
19 dnsDomainIs(host, ".career-women.ch") ||
20 dnsDomainIs(host, ".ilce.ch") ||
21 dnsDomainIs(host, ".isnetne.ch") ||
22 dnsDomainIs(host, ".agf.hes.so.ch") ||
23 dnsDomainIs(host, ".hesap1.eif.ch") ||
24 host == "127.0.0.1" ||
25 host.substring(0,3) == "10." ||
26 host.substring(0,10) == "157.26.64." ||
27 host.substring(0,8) == "192.168." ||
28 host == "57.26.241.20") {
29 return "DIRECT";
30 }
31 else {
32 return "PROXY proxy.he-arc.ch:8080";
33 }
34 }
35 }
36
37 At school, it works correctly (it uses the proxy when it is
38 necessary), but not at home. I think the "myIpAddress" is maybe not
39 the right solution.
40
41 Does anybody have an idea how to solve my problem ? I would prefer a
42 more global solution (for the whole system, not only Firefox), but if
43 you have an idea for Firefox, I would be really happy !
44
45 Thanks
46
47 Ben
48 --
49 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] auto proxy config (Firefox, and more) Willie Wong <wwong@×××××××××.EDU>