美文网首页JavaScript
常用软件设置代理方法

常用软件设置代理方法

作者: consolelog | 来源:发表于2022-08-23 17:14 被阅读0次

Git

设置代理

git config --global http.proxy socks5://127.0.0.1:10808
git config --global https.proxy socks5://127.0.0.1:10808

查看代理

git config --global --get http.proxy
git config --global --get https.proxy

删除代理

git config --global --unset http.proxy
git config --global --unset https.proxy

设置尽在连接github.com时有效

git config --global http.https://github.com.proxy socks5://127.0.0.1:10808

git config --global --unset http.https://github.com.proxy

git config --global --get http.https://github.com.proxy

Npm

  1. 修改源地址

查看当前使用的地址

npm config get registry

使用阿里源

阿里镜像站地址: https://npmmirror.com

npm config set registry https://registry.npmmirror.com/

恢复官方源

npm config set registry https://registry.npmjs.org/
  1. 设置代理

查看代理

npm config get proxy
npm config get https-proxy

设置代理

npm config set proxy socks5://127.0.0.1:10808
npm config set https-proxy socks5://127.0.0.1:10808

删除代理

npm config delete proxy
npm config delete https-proxy

Yarn

  1. 修改源地址

查看当前使用的地址

yarn config get registry

使用阿里源

yarn config set registry https://registry.npmmirror.com/

恢复官方源

yarn config set registry https://registry.yarnpkg.com/
  1. 设置代理

查看代理

yarn config get proxy
yarn config get https-proxy

设置代理

yarn config set proxy socks5://127.0.0.1:10808
yarn config set https-proxy socks5://127.0.0.1:10808

删除代理

yarn config delete proxy
yarn config delete https-proxy

相关文章

网友评论

    本文标题:常用软件设置代理方法

    本文链接:https://www.haomeiwen.com/subject/cjjogrtx.html