注意所有ip都要加上http://
# /etc/profile
# System wide environment and startup
programs, for login setup
# Functions and aliases Go in
/etc/bashrc
no_proxy="localhost,127.0.0.1,192.168.10.0/24"
export ftp_proxy
export http_proxy
export https_proxy
export no_proxy
注意,若是使用的复制,需要用vi打开删除不识别的^m符号。
添加完后重启系统即可。这时所有的网络连接均通过代理来联网。
测试方法:
# wget “www.baidu.com”
–2011-09-06 07:29:17– http://www.baidu.com/
Connecting to 192.168.10.209:3128… connected.
Proxy request sent, awaiting response… 200 OK
Length: 81 [text/html]
Saving to: `index.html’
100%[====================================>]
81 –.-K/s in 0s
2011-09-06 07:29:17 (7.72 MB/s) –
`index.html’ saved [81/81]
也可仅仅修改 apt的代理
/etc/apt/apt.conf
Acquire::http::Proxy "http://192.168.10.209:3128"; #注意分号
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)