-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproxy.pac
95 lines (83 loc) · 2.81 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* See also: */
/* Info: http://findproxyforurl.com/example-pac-file/ */
/* Testing: https://thorsen.pm/proxyforurl */
function FindProxyForURL(url, host) {
/* SAMPLES */
/* return url; //useful for troubleshooting */
/* return host; //useful for troubleshooting */
/* if ( shExpMatch( host, "(vsphere|netdot).ncsa.illinois.edu" ) ) */
/* if ( shExpMatch( url, "*192.168*") ) */
/* Local proxy ports */
var proxy_5700 = "SOCKS5 127.0.0.1:5700";
var proxy_5701 = "SOCKS5 127.0.0.1:5701";
var proxy_5702 = "SOCKS5 127.0.0.1:5702";
var proxy_5703 = "SOCKS5 127.0.0.1:5703";
var proxy_5704 = "SOCKS5 127.0.0.1:5704";
/* ACHE (5700) */
var ache_tunnel_hosts = [
"ache-vcenter.internal.ncsa.edu",
"ache-git.ncsa.illinois.edu",
];
if ( ache_tunnel_hosts.includes( host ) )
return proxy_5700;
/* Anything below here isn't needed when connected to VPN */
if (isInNet(myIpAddress(), "141.142.146.0", "255.255.255.0"))
return "DIRECT";
/* CERBERUS (5701) */
var cerb_tunnel_hosts = [
"vsphere.ncsa.illinois.edu",
"netdot.ncsa.illinois.edu",
];
if ( cerb_tunnel_hosts.includes( host ) )
return proxy_5701;
/* VMs (5702) */
if ( isInNet(host, "192.168.28.0", "255.255.254.0") )
return proxy_5702;
/* ICCP BMC (5704) */
if ( isInNet(host, "10.60.0.0", "255.255.0.0") )
return proxy_5704;
/* FLASK TESTING */
if ( url.startsWith( "http://eukelade" ) )
return proxy_5703;
if ( url.startsWith( "http://127.0.0.1" ) )
return proxy_5703;
/* ACCESS TESTING */
if ( url.startsWith( "http://localhost" ) )
return proxy_5703;
/* Uncomment when in Wiki / Jira Maintenance */
/* if ( shExpMatch(host, "jira-*.ncsa.illinois.edu") || */
/* shExpMatch(host, "wiki*.ncsa.illinois.edu") || */
/* shExpMatch( host, "*.internal.ncsa.edu" ) */
/* ) */
/* return proxy_5703; */
/* Anything below here isn't needed when accessed from work */
if (isInNet(myIpAddress(), "141.142.0.0", "255.255.0.0"))
return "DIRECT";
/* NCSA (5703) FQDNs*/
var ncsa_tunnel_hosts = [
"cotton.ncsa.illinois.edu",
"crashplan.ncsa.illinois.edu",
"help-dev.ncsa.illinois.edu",
"identity.ncsa.illinois.edu",
"identity.uillinois.edu",
"internal.ncsa.illinois.edu",
"internal-dev.ncsa.illinois.edu",
"internal-test.ncsa.illinois.edu",
"jira-assets-dev.ncsa.illinois.edu",
"jira-old.ncsa.illinois.edu",
"jiracmdline.ncsa.illinois.edu",
"kblum-jira.ncsa.illinois.edu",
"mylar.ncsa.illinois.edu",
"netact.ncsa.illinois.edu",
"odcim.ncsa.illinois.edu",
"paper.ncsa.illinois.edu",
"papyrus.ncsa.illinois.edu",
"parchment.ncsa.illinois.edu",
"tyvek.ncsa.illinois.edu",
"vellum.ncsa.illinois.edu",
];
if ( ncsa_tunnel_hosts.includes( host ) )
return proxy_5703;
/* No match */
return "DIRECT";
}