分页: 1 / 1

ubuntu网络全局代理

发表于 : 2016-06-10 20:12
dkkacceler
版本:ubuntu 16.04
apt wget git 等命令下载国外文件太慢
怎么实现ubuntu 的全局代理

Re: ubuntu网络全局代理

发表于 : 2016-06-10 21:28
vickycq
dkkacceler 写了:怎么实现ubuntu 的全局代理
为避免可能出现的问题,建议分别具体处理

对于 http 代理:
apt : 使用

代码: 全选

sudo apt-get -o Acquire::http::proxy="http://username:password@addr:port";
wget : 使用

代码: 全选

wget -e use_proxy=yes -e http_proxy=http://addr:port <URL>
git : 使用

代码: 全选

git config --global http.proxy http://addr:port
对于其他类型代理:
可根据需要使用代理的应用程序情况,使用 proxychains 或转换为 http 代理使用