mirror of
https://codeberg.org/postscriptum/pac.git
synced 2026-04-01 05:25:28 +00:00
42 lines
No EOL
967 B
JavaScript
42 lines
No EOL
967 B
JavaScript
// Clearnet asset
|
|
|
|
function FindProxyForURL(url, host)
|
|
{
|
|
var whitelist = [
|
|
"censor.net",
|
|
"codeberg.org",
|
|
"crates.io",
|
|
"devzone.org.ua",
|
|
"duck.ai",
|
|
"duckduckgo.com",
|
|
"exception.net.ua",
|
|
"fediland.in.ua",
|
|
"github.com",
|
|
"githubusercontent.com",
|
|
"gmail.com",
|
|
"google.com",
|
|
"linux.org.ua",
|
|
"linuxmint.com.ua",
|
|
"lostfilm.tv",
|
|
"mastodon.social",
|
|
"mazepa.to",
|
|
"opennet.me",
|
|
"peertube.in.ua",
|
|
"protonmail.com",
|
|
"rutracker.org",
|
|
"toloka.to",
|
|
"tuta.com",
|
|
"uakino.best",
|
|
"unian.net",
|
|
"unian.ua",
|
|
"wikipedia.org",
|
|
"youtube.com",
|
|
];
|
|
|
|
for (var i = 0; i < whitelist.length; i++) {
|
|
if (host === whitelist[i] || host.endsWith("." + whitelist[i])) {
|
|
return "DIRECT";
|
|
}
|
|
}
|
|
return "PROXY 127.0.0.1:0"; // fake proxy
|
|
} |