Skip to content

Instantly share code, notes, and snippets.

@arastu
Last active February 5, 2018 20:24
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save arastu/a552850fa5eec7076ff64e7bfb10c541 to your computer and use it in GitHub Desktop.
Save arastu/a552850fa5eec7076ff64e7bfb10c541 to your computer and use it in GitHub Desktop.
# using:
# for set proxy:
# $ setproxy 127.0.0.1 8118
# for unset:
# $ unsetproxy
function setproxy() {
export {http,https,ftp,HTTP,HTTPS}_proxy=http://$1:$2
export no_proxy="localhost,127.0.0.1,master.cafecluster"
echo "Proxy variable(http,https,ftp) set to $1:$2"
}
function unsetproxy() {
unset {http,https,ftp,HTTP,HTTPS,no}_proxy
echo "Proxy variable(http,https,ftp) is unset!"
}
@mehdialipour
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment