-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathproxy.pac
More file actions
34 lines (29 loc) · 795 Bytes
/
proxy.pac
File metadata and controls
34 lines (29 loc) · 795 Bytes
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
function FindProxyForURL(url, host) {
var fallback = 'DIRECT';
var proxies = {
'yildizlib': 'PROXY libpxy.cc.yildiz.edu.tr:81; ' + fallback
};
var hosts = {
'ieeexplore.ieee.org': 'yildizlib',
'*.jstor.org': 'yildizlib',
'*.safaribooksonline.com': 'yildizlib',
'*.acm.org': 'yildizlib',
'journals.cambridge.org': 'yildizlib',
'distro.cc.yildiz.edu.tr': 'yildizlib',
'*.ebrary.com': 'yildizlib',
'www.scientificamerican.com': 'yildizlib',
'onlinelibrary.wiley.com': 'yildizlib',
'link.springer.com': 'yildizlib'
};
if (isPlainHostName(host)) {
return 'DIRECT';
}
for (var h in hosts) {
if (hosts.hasOwnProperty(h)) {
if (shExpMatch(host, h)) {
return proxies[hosts[h]];
}
}
}
return fallback;
}