CONTENTS
代理对于apt-get始终有效
在/etc/apt/apt.conf.d 下新建一个08proxy文件,内容为:
Acquire::http::proxy "http://127.0.0.1:8000/"; Acquire::ftp::proxy "ftp://127.0.0.1:8000/"; Acquire::https::proxy "https://127.0.0.1:8000/";
代理仅对当前shell有效(未测试)
export http_proxy=http://127.0.0.1:8000 sudo apt-get update
代理仅对当前命令有效(未测试)
sudo apt-get -o Acquire::http::proxy="http://127.0.0.1:8000/" update
发表评论