Zeke Xiao

Zeke Xiao

github

各類工具設置 Proxy - git, apt, pip, npm...

系統#

文件 /etc/environment

http_proxy=http://127.0.0.1:3128
https_proxy=http://127.0.0.1:3128
all_proxy=http://127.0.0.1:3128

.bashrc

export http_proxy=http://127.0.0.1:1089
export https_proxy=http://127.0.0.1:1089
export all_proxy=http://127.0.0.1:1089

git#

git config --global https.proxy http://127.0.0.1:1089
git config --global https.proxy http://127.0.0.1:1089
git config --global http.proxy 'socks5://127.0.0.1:8889' 
git config --global https.proxy 'socks5://127.0.0.1:8889'
git config --global --unset http.proxy
git config --global --unset https.proxy

apt#

文件 /etc/apt/apt.conf

Acquire::http::Proxy "http://127.0.0.1:1089";
Acquire::https::Proxy "http://127.0.0.1:1089";
Acquire::ftp::Proxy "http://127.0.0.1:1089";

臨時

sudo apt-get -o Acquire::http::proxy="http://127.0.0.1:1089/" install git

npm#

// 鏡像
npm config set registry http://registry.cnpmjs.org

// 代理
npm config set proxy http://127.0.0.1:1089
npm confit set https-proxy http://127.0.0.1:1089
npm config delete proxy
npm config delete https-proxy

yarn#

yarn config set registry https://registry.npm.taobao.org
yarn config set proxy http://127.0.0.1:1089
yarn config set https-proxy http://127.0.0.1:1089
yarn config delete proxy
yarn config delete https-proxy

pip#

pip install --proxy='http://127.0.0.1:1089'
載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。