1.command
set http_proxy=http://127.0.0.1:1080
set https_proxy=http://127.0.0.1:1080
2. powershell
$env:http_proxy="http://127.0.0.1:1080"
$env:https_proxy="http://127.0.0.1:1080"
3.ubuntu
a.临时
export http_proxy="http://127.0.0.1:12333"
export https_proxy="http://127.0.0.1:12333"
sudo apt-get update
b.修改配置文件
gedit ~/.bashrc
export http_proxy="http://127.0.0.1:12333"
export https_proxy="http://127.0.0.1:12333"
c.apt-get设置
gedit /etc/apt/apt.conf
Acquire::http::proxy "http://127.0.0.1:12333/";
Acquire::https::proxy "http://127.0.0.1:12333/";
sudo apt-get -o Acquire::http::proxy="http://127.0.0.1:12333/" update
4.git
git config --global http.proxy "socks5://127.0.0.1:1080"
git config --global https.proxy "socks5://127.0.0.1:1080"