Skip to content

Instantly share code, notes, and snippets.

@gali1
Forked from swinton/proxy.pac
Created January 30, 2024 10:20
Show Gist options
  • Save gali1/37a355cdba0b57b9a109b12c4d615103 to your computer and use it in GitHub Desktop.
Save gali1/37a355cdba0b57b9a109b12c4d615103 to your computer and use it in GitHub Desktop.
Example proxy.pac, using a SOCKS proxy for certain hosts.
function FindProxyForURL(url, host) {
var useSocks = ["imgur.com"];
for (var i= 0; i < useSocks.length; i++) {
if (shExpMatch(host, useSocks[i])) {
return "SOCKS localhost:9999";
}
}
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment