Daily
常用代理设置
基本代理设置
- Windows
set http_proxy=http://127.0.0.1:1081
set https_proxy=http://127.0.0.1:1081
- Linux
export HTTP_PROXY=http://127.0.0.1:1081
export HTTPS_PROXY=http://127.0.0.1:1081
Golang
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.io,direct
Git代理设置
git config --global http.proxy socks5://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --list
NPM 代理设置
- 设置代理源
npm config set registry https://registry.npm.taobao.org
npm config set registry https://registry.npmjs.org/
npm config set registry https://registry.npmmirror.org/
- 查看代理源
npm config get registry
- 设置本地代理
npm config set proxy http://127.0.0.1:1081
npm config set https-proxy https://127.0.0.1:1081
Python Pip
- 在pip命令运行时加入
-i
可指定代理源
-i https://pypi.tuna.tsinghua.edu.cn/simple/