Created
October 3, 2012 16:01
-
-
Save mattikus/3827807 to your computer and use it in GitHub Desktop.
This file contains 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
function p() { | |
case "$1" in | |
up|on) | |
export http_proxy="http://proxy:3128" | |
export https_proxy="http://proxy:3128" | |
export ftp_proxy="http://proxy:3128" | |
echo "proxy on!" | |
;; | |
down|off) | |
unset http_proxy https_proxy ftp_proxy | |
echo "proxy off!" | |
;; | |
*) | |
echo ${http_proxy:-off} | |
;; | |
esac | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment