Skip to content

Instantly share code, notes, and snippets.

@cuteribs-1
Created May 7, 2020 16:06
Show Gist options
  • Save cuteribs-1/7c8805bbad7c9f35496ce1d01c951fd1 to your computer and use it in GitHub Desktop.
Save cuteribs-1/7c8805bbad7c9f35496ce1d01c951fd1 to your computer and use it in GitHub Desktop.
alias proxy='
export ALL_PROXY=socks5://localhost:10081/
export HTTP_PROXY=socks5://localhost:10081/
export HTTPS_PROXY=socks5://localhost:10081/
git config --global https.proxy http://localhost:10081
git config --global https.proxy https://localhost:10081
npm config set proxy=http://localhost:10081
npm config set https-proxy http://localhost:10081
';
alias unproxy='
export ALL_PROXY=
export HTTP_PROXY=
export HTTPS_PROXY=
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
npm config delete https-proxy
';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment