Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get your proxy configuration in bash directly from zscaller .pac file
PROXY=http://$(curl -q http://pac.zscalertwo.net/XXX/proxypac-prod.pac 2>/dev/null | grep "PROXY" | grep -oP "\b(?:\d{1,3}\.){3}\d{1,3}\b:[0-9]*" | head -n 1)
echo "SETTING PROXY : $PROXY"
export HTTP_PROXY=$PROXY
export HTTPS_PROXY=$PROXY
export http_proxy=$PROXY
export https_proxy=$PROXY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment