-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproxy.pac
31 lines (25 loc) · 1.39 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
function FindProxyForURL(url, host) {
// if request matches regex video-weaver then proxy the request to HTTP proxy
if (shExpMatch(host, "video-weaver.*.ttvnw.net")) {
return "PROXY eu.restricted.api.cdn-perfprod.com:6691; PROXY beta.eu.restricted.api.cdn-perfprod.com:6691; DIRECT";
}
// usher request proxying / twitch cdn assignment
if (shExpMatch(host, "usher.ttvnw.net")) {
return "PROXY eu.restricted.api.cdn-perfprod.com:6691; PROXY beta.eu.restricted.api.cdn-perfprod.com:6691; DIRECT";
}
if (shExpMatch(host, "www.twitch.tv")) {
return "PROXY eu.restricted.api.cdn-perfprod.com:6691; PROXY beta.eu.restricted.api.cdn-perfprod.com:6691; DIRECT";
}
if (shExpMatch(host, "gql.twitch.tv")) {
return "PROXY eu.restricted.api.cdn-perfprod.com:6691; PROXY beta.eu.restricted.api.cdn-perfprod.com:6691; DIRECT";
}
if (shExpMatch(host, "passport.twitch.tv")) {
return "PROXY eu.restricted.api.cdn-perfprod.com:6691; PROXY beta.eu.restricted.api.cdn-perfprod.com:6691; DIRECT";
}
// for testing purposes (know if you're connected to X loadbalancer or not)
if (shExpMatch(host, "example.org")) {
return "PROXY ddgarciaf:[email protected]:6691; PROXY ddgarciaf:[email protected]:6691; DIRECT";
}
// all other requests simply gets thru without any proxy involved
return "DIRECT";
}