Skip to content

Instantly share code, notes, and snippets.

@nite
Created May 20, 2024 14:36
Show Gist options
  • Save nite/f35f938ffa5982c560dbc477403fc04e to your computer and use it in GitHub Desktop.
Save nite/f35f938ffa5982c560dbc477403fc04e to your computer and use it in GitHub Desktop.
function FindProxyForURL(url, host) {
// If we are not on the office network or VPN, then use a proxy
if (!isInNet(myIpAddress(), "192.168.48.0", "255.255.240.0")) {
if (shExpMatch(host, "*staging.bmll.io") ||
(!shExpMatch(host, "innovation.dev.bmll.io") && shExpMatch(host, "*dev.bmll.io")) ||
shExpMatch(host, "*lab.bmlldev.com") ||
shExpMatch(host, "*staticweb.bmlldev.com") ||
shExpMatch(host, "*staging.bmlldev.com") ||
shExpMatch(host, "*dev.bmlldev.com") ||
shExpMatch(host, "*james.bmll.io") ||
shExpMatch(host, "*search-elasticsearch-bmlltech-urx3ajwxbrcfeyk4wykfqxfivy.us-east-1.es.amazonaws.com"))
return "PROXY 172.30.247.210:3128";
return "DIRECT";
}
else {
return "DIRECT";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment