Skip to content

Instantly share code, notes, and snippets.

@stepansnigirev
Created January 16, 2021 21:32
Show Gist options
  • Save stepansnigirev/958c7db25c90731ba895e2fa206d2d05 to your computer and use it in GitHub Desktop.
Save stepansnigirev/958c7db25c90731ba895e2fa206d2d05 to your computer and use it in GitHub Desktop.
pac file to open all .onion files via tor proxy
// SPDX-License-Identifier: CC0-1.0
function FindProxyForURL(url, host)
{
if (shExpMatch(host, "*.i2p"))
{
return "SOCKS5 127.0.0.1:4447";
}
if (shExpMatch(host, "*.onion"))
{
return "SOCKS5 127.0.0.1:9050";
}
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment