160 lines
4.1 KiB
JavaScript
160 lines
4.1 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, "*.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")) ||
|
|
(shExpMatch(host, "instagram.com")) ||
|
|
(shExpMatch(host, "*.cdninstagram.com")))
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
//youtube
|
|
|
|
if ((shExpMatch(host, "youtube.com")) ||
|
|
(shExpMatch(host, "*.youtube.com")) ||
|
|
(shExpMatch(host, "*.youtu.be")) ||
|
|
(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, "*.google.com")) ||
|
|
(shExpMatch(host, "*.yt.be")) ||
|
|
(shExpMatch(host, "yt.be")) ||
|
|
(shExpMatch(host, "*.l.google.com")) ||
|
|
(shExpMatch(host, "l.google.com")))
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
|
|
else
|
|
//chatgpt
|
|
|
|
if ((shExpMatch(host, "chatgpt.com")) ||
|
|
(shExpMatch(host, "openai.com")) ||
|
|
(shExpMatch(host, "*.openai.com")) ||
|
|
(shExpMatch(host, "*.chatgpt.com")))
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
|
|
//digitalocean.com
|
|
|
|
if ((shExpMatch(host, "digitalocean.com")) ||
|
|
(shExpMatch(host, "*.digitalocean.com")))
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
|
|
|
|
|
|
//cisco
|
|
|
|
if ((shExpMatch(host, "cisco.com")) ||
|
|
(shExpMatch(host, "*.cisco.com")))
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
|
|
//medium
|
|
|
|
if ((shExpMatch(host, "medium.com")) ||
|
|
(shExpMatch(host, "*.medium.com")))
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
|
|
//homarr
|
|
|
|
if ((shExpMatch(host, "homarr.dev")) ||
|
|
(shExpMatch(host, "*.homarr.dev")))
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
|
|
//netgate
|
|
|
|
if ((shExpMatch(host, "netgate.com")) ||
|
|
(shExpMatch(host, "*.netgate.com")) ||
|
|
(shExpMatch(host, "boostymark.com")) ||
|
|
(shExpMatch(host, "*.boostymark.com")))
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
|
|
//discord
|
|
|
|
if ((shExpMatch(host, "discord.com")) ||
|
|
(shExpMatch(host, "*.discord.com")) ||
|
|
(shExpMatch(host, "discord.gg")) ||
|
|
(shExpMatch(host, "*.discord.gg")))
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
|
|
//notepad-plus-plus.org
|
|
|
|
if ((shExpMatch(host, "notepad-plus-plus.org")) ||
|
|
(shExpMatch(host, "*.notepad-plus-plus.org")))
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
|
|
//clickhouse
|
|
|
|
if ((shExpMatch(host, "clickhouse.com")) ||
|
|
(shExpMatch(host, "*.clickhouse.com")))
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
|
|
//vagrant
|
|
|
|
if ((shExpMatch(host, "hashicorp.com")) ||
|
|
(shExpMatch(host, "*.hashicorp.com")) ||
|
|
(shExpMatch(host, "vagrantup.com")) ||
|
|
(shExpMatch(host, "*.vagrantup.com")) ||
|
|
(shExpMatch(host, "vagrantcloud.com")) ||
|
|
(shExpMatch(host, "*.vagrantcloud.com")))
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
|
|
//turnkey
|
|
|
|
if ((shExpMatch(host, "turnkeylinux.org")) ||
|
|
(shExpMatch(host, "*.turnkeylinux.org")))
|
|
{ return "SOCKS5 proxy.vm:1080"}
|
|
|
|
else
|
|
|
|
|
|
{ // Default: no proxy,
|
|
return "DIRECT" }
|
|
// End of PAC file
|
|
}
|
|
//test
|