Skip to content

Instantly share code, notes, and snippets.

@uplus
Last active September 24, 2017 04:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uplus/2e40b78d44769aa511340b530b46783e to your computer and use it in GitHub Desktop.
Save uplus/2e40b78d44769aa511340b530b46783e to your computer and use it in GitHub Desktop.
proxy-on () {
proxy="${1:? server:port}"
export http_proxy="${proxy}"
export https_proxy="${proxy}"
export ftp_proxy="${proxy}"
export rsync_proxy="${proxy}"
export all_proxy="${proxy}"
export HTTP_PROXY="${proxy}"
export HTTPS_PROXY="${proxy}"
export FTP_PROXY="${proxy}"
export RSYNC_PROXY="${proxy}"
export ALL_PROXY="${proxy}"
export no_proxy='localhost,127.0.0.1,localaddress,.localdomain.com'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment