Skip to content

Instantly share code, notes, and snippets.

@s1037989
Last active August 16, 2022 22:28
Show Gist options
  • Save s1037989/dbab5c0da819ae60cebe4ac4a95a84b8 to your computer and use it in GitHub Desktop.
Save s1037989/dbab5c0da819ae60cebe4ac4a95a84b8 to your computer and use it in GitHub Desktop.
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file
// application/x-ns-proxy-autoconfig
// https://linuxconfig.net/manuals/howto/squid-and-ldap-authentication-from-active-directory.html
function FindProxyForURL(url, host) {
if (shExpMatch(host, "xyz*") && shExpMatch(url, "*:8123*")) {
return "PROXY w3proxy.mozilla.org:8080";
} else {
return "DIRECT";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment