I do not want waste time in GFW again.
目录
- pip
- git
- cargo
- apt (apt-get)
- curl
- Gradle
- Maven
- go get
- npm
- rustup
- yarn
- gem
- brew
- wget
- snap
- docker
- Electron Dev Dependency
- Visual Studio Code Remote (WSL2)
- Visual Studio Code Remote (SSH)
- Tips
- Scoop
- OpenWRT opkg
~/.config/pip/pip.conf
[global]
proxy=https://localhost:1087
注意不支持socks5
在 文件 ~/.ssh/config
后添加下面两行
Host github.com
# Mac下
ProxyCommand nc -X 5 -x 127.0.0.1:1080 %h %p
# Linux下
ProxyCommand nc --proxy-type socks5 --proxy 127.0.0.1:1080 %h %p
注意Linux和Mac下ncat/netcat区别,详见https://unix.stackexchange.com/questions/368155/what-are-the-differences-between-ncat-nc-and-netcat
git config --global http.proxy https://127.0.0.1:1087
建议使用http, 因为socks5 在使用git-lfs时会报错proxyconnect tcp: dial tcp: lookup socks5: no such host
https://gist.github.com/laispace/666dd7b27e9116faece6
Cargo 会依次检查以下位置
- 环境变量
CARGO_HTTP_PROXY
export CARGO_HTTP_PROXY=https://127.0.0.1:1080
- 任意
config.toml
中的http.proxy