git clone
from github is always slow in China, using a proxy will be much better.
Proxychains is CLI tool that can proxy command in terminal.
such as:
proxychains git clone https://github.com/GoogleChrome/web.dev
before using this command, 2 steps should be made:
sudo apt install proxychains
- setting proxy server's url in
/etc/proxychains.conf
, http are socks proxy are both supported. My configuration is below, in which I'm using socks5 proxy with url of 127.0.0.1, 1080 port. - (optional) set bash alias,
alias gc="proxychains git clone"
The details about configuration can refer to: https://www.binarytides.com/proxify-applications-with-tsocks-and-proxychains-on-ubuntu/
it can also used in npm install
, setting bash alias:
alias npm="proxychains npm"