Skip to content

Instantly share code, notes, and snippets.

@jupierce
Last active July 19, 2025 08:24
Show Gist options
  • Select an option

  • Save jupierce/f0f2cd8721c3fa4fbf08451e1003a6e6 to your computer and use it in GitHub Desktop.

Select an option

Save jupierce/f0f2cd8721c3fa4fbf08451e1003a6e6 to your computer and use it in GitHub Desktop.
// First, download the proxy pac file locally (make sure to use RAW content)
// wget https://gist.githubusercontent.com/jupierce/f0f2cd8721c3fa4fbf08451e1003a6e6/raw -O /path/to/proxy.pac # Download git content to your home directory
// Second, use browser specific configuration steps
// ***Firefox****
// Open about:config in the URL bar.
// Configure 'network.proxy.autoconfig_url' setting to point to this gist 'file:///path/to/proxy.pac' for the setting's value.
// ***Chrome****
// In order for this option to work with Chrome, no other instance of Chrome can be running when this command is run.
// Chrome (linux): google-chrome --proxy-pac-url=file:///path/to/proxy.pac
// If other Chrome instances are running, you can still use a CLI invocation, but a user data directory must be included
// google-chrome --proxy-pac-url=file:///path/to/proxy.pac --user-data-dir=/some/new/directory
function FindProxyForURL(url, host) {
if (shExpMatch(url,"*.hua.hrsmart.com/*")) {
return "PROXY squid.corp.redhat.com:3128; DIRECT";
}
if (shExpMatch(url,"*internal-redhat.icims.com/*")) {
return "PROXY squid.corp.redhat.com:3128; DIRECT";
}
if (shExpMatch(url,"*.adaptiveplanning.com/*")) {
return "PROXY squid.corp.redhat.com:3128; DIRECT";
}
if (shExpMatch(url,"*.fxall.com/*")) {
return "PROXY squid.corp.redhat.com:3128; DIRECT";
}
//https://home.corp.redhat.com/node/41725
if (shExpMatch(url,"*lwn.net/*")) {
return "PROXY squid.rdu.redhat.com:3128; DIRECT";
}
if (shExpMatch(url,"*ci.dev.openshift.redhat.com/*")) {
return "PROXY squid.rdu.redhat.com:3128; DIRECT";
}
if (shExpMatch(url,"*.compute-1.amazonaws.com/*")) {
return "PROXY squid.rdu.redhat.com:3128; DIRECT";
}
if (shExpMatch(url,"*.openshiftdev.redhat.com/*")) {
return "PROXY squid.rdu.redhat.com:3128; DIRECT";
}
if (shExpMatch(url,"*.dev.rhcloud.com/*")) {
return "PROXY squid.rdu.redhat.com:3128; DIRECT";
}
if (shExpMatch(url,"*cr.ops.openshift.com*")) {
return "PROXY squid.rdu.redhat.com:3128; DIRECT";
}
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment