53 lines
1.3 KiB
JavaScript
53 lines
1.3 KiB
JavaScript
function FindProxyForURL(url, host) {
|
|
|
|
//Linkedin domains
|
|
if ((shExpMatch(host, "linkedin.com")) || (shExpMatch(host, "www.linkedin.com")))
|
|
{ return "SOCKS5 proxy.vm:1080" }
|
|
else
|
|
//rutracker.org
|
|
|
|
if ((shExpMatch(host, "rutracker.org")) || (shExpMatch(host, "*.rutracker.*")))
|
|
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
else
|
|
//kinozal.tv
|
|
|
|
if ((shExpMatch(host, "kinozal.tv")) || (shExpMatch(host, "www.kinozal.tv")))
|
|
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
else
|
|
//ntc.party
|
|
|
|
if (shExpMatch(host, "ntc.party"))
|
|
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
//instagram
|
|
|
|
if (shExpMatch(host, "*instagram.com"))
|
|
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
//youtube
|
|
|
|
if (
|
|
(shExpMatch(host, "youtube.com")) ||
|
|
(shExpMatch(host, "youtu.be")) ||
|
|
(shExpMatch(host, "ytimg.com")) ||
|
|
(shExpMatch(host, "ggpht.com")) ||
|
|
(shExpMatch(host, "googleusercontent.com")) ||
|
|
(shExpMatch(host, "googlevideo.com")) ||
|
|
(shExpMatch(host, "google.com")) ||
|
|
(shExpMatch(host, "googleapis.com"))
|
|
)
|
|
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
{ // Default: no proxy,
|
|
return "DIRECT" }
|
|
// End of PAC file
|
|
}
|