Skip to content

Instantly share code, notes, and snippets.

@mattikus
Created October 3, 2012 16:01
Show Gist options
  • Save mattikus/3827807 to your computer and use it in GitHub Desktop.
Save mattikus/3827807 to your computer and use it in GitHub Desktop.
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