-
Notifications
You must be signed in to change notification settings - Fork 7
/
.proxy.pac
40 lines (38 loc) · 1.29 KB
/
.proxy.pac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function FindProxyForURL(url, host) {
/**
* RAILS MACHINE
* Stuff inside gateways. Use something like
*
* ssh -NCfq -D 2444 [email protected]
*
* to get a SOCKS proxy on localhost port 2444. Since you need
* a couple, using a tunnel manager app or a shell alias is helpful.
*/
if (dnsDomainIs(host, "cacti.gnax.railsmachine.net") ||
dnsDomainIs(host, "sflow.gnax.railsmachine.net"))
{
return "SOCKS localhost:3444; DIRECT";
}
else if (dnsDomainIs(host, "cacti.pnap.railsmachine.net")) {
return "SOCKS localhost:2444; DIRECT";
}
/**
* PERSONAL
* Stuff that tries to deny IPs based on region. That's lame. And
* Americans travel y'know.
*/
else if (dnsDomainIs(host, ".pandora.com") ||
dnsDomainIs(host, ".amazon.com") ||
dnsDomainIs(host, ".hulu.com") ||
dnsDomainIs(host, ".last.fm") ||
dnsDomainIs(host, ".netflix.com") ||
dnsDomainIs(host, ".ustream.tv") ||
dnsDomainIs(host, "music.google.com") ||
dnsDomainIs(host, "*.annualcreditreport.com"))
{
return "SOCKS localhost:8080; DIRECT";
}
else {
return "DIRECT";
}
}