linux下各种工具通过代理上网的配置方式

分享linux下各种工具通过代理上网的配置方式。

#apt get 配置代理 vim /etc/apt/apt.conf.d/proxy.conf
sudo cat > /etc/apt/apt.conf.d/proxy.conf << "EOF"
Acquire::http::proxy "http://x.x.x.x:8088/";
Acquire::ftp::proxy "ftp://x.x.x.x:8088";
Acquire::https::proxy "https://x.x.x.x:8088";
EOF


#wget 代理 
 https_proxy = http://x.x.x.x:8088/ 
 http_proxy = http://x.x.x.x:8088/ 
 ftp_proxy = http://x.x.x.x:8088/


#git代理 
//http || https
git config --global http.proxy x.x.x.x:8088 --replace-all
git config --global https.proxy x.x.x.x:8088 --replace-all

#linux 全局
~/.bashrc
export http_proxy=x.x.x.x:8088
export https_proxy=$http_proxy

#curl代理 
proxy="http://x.x.x.x:8088"

你可能感兴趣的:(Linux,linux,运维,服务器)