Created
July 17, 2018 12:55
-
-
Save thomaspoignant/a768887d86caa7aa94ebf1b22b46eced to your computer and use it in GitHub Desktop.
Get your proxy configuration in bash directly from zscaller .pac file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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