Skip to content
forked from rosebe/FUCK-GFW

记录各个包管理器使用代理的方法, 因为GFW已经浪费了已经数不清的时间, FUCK GFW

Notifications You must be signed in to change notification settings

robsss/FUCK-GFW

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 

Repository files navigation

FUCK-GFW

I do not want waste time in GFW again.

目录

pip

~/.config/pip/pip.conf

[global]
proxy=https://localhost:1087

注意不支持socks5

Reference

git

clone with ssh

在 文件 ~/.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

clone with http

git config --global http.proxy https://127.0.0.1:1087

建议使用http, 因为socks5 在使用git-lfs时会报错proxyconnect tcp: dial tcp: lookup socks5: no such host

Reference

https://gist.github.com/laispace/666dd7b27e9116faece6

cargo

Cargo 会依次检查以下位置

  1. 环境变量 CARGO_HTTP_PROXY
export CARGO_HTTP_PROXY=https://127.0.0.1:1080
  1. 任意 config.toml 中的 http.proxy