Skip to content

Instantly share code, notes, and snippets.

@louisje
Last active July 9, 2018 07:52
Show Gist options
  • Save louisje/d0548094c5aaacb736bd18e7240cfa49 to your computer and use it in GitHub Desktop.
Save louisje/d0548094c5aaacb736bd18e7240cfa49 to your computer and use it in GitHub Desktop.
function FindProxyForURL(url, host) {
if (dnsDomainIs(host, ".i2p")) {
if (url.substring(0, 6) == 'https:') {
return "PROXY localhost:4445";
} else {
return "PROXY localhost:4444";
}
} else {
return "DIRECT";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment