公司的代理是 .pac 文件自动配置的,观察发现代理为 <proxy>:<port>,没有协议头。。。
直接修改.bashrc, 加入 http_proxy=<proxy>:<port>
export http_proxy
在shell中键入: source ~/.bashrc
可以通过 echo $http_proxy查看是否设置成功。
wget可以用了,但是apt-get却出错
error log:
......Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22 Invalid argument)....
最后发现 把http_proxy加http头就行。。。。
http_proxy=http://<proxy>:<port>
直接修改.bashrc, 加入 http_proxy=<proxy>:<port>
export http_proxy
在shell中键入: source ~/.bashrc
可以通过 echo $http_proxy查看是否设置成功。
wget可以用了,但是apt-get却出错
error log:
......Cannot initiate the connection to 8080:80 (0.0.31.144). - connect (22 Invalid argument)....
最后发现 把http_proxy加http头就行。。。。
http_proxy=http://<proxy>:<port>