sudo apt-get install squid3
编辑配置文件:/etc/squid3/squid.conf
sudo cp /etc/squid3/squid.conf /etc/squid3/squid.conf.original
修改:
http_port 8888
改变 visible_hostname 语句是为了给 Squid 服务器一个特定的主机名。
visible_hostname weezie
http_access deny all 修改为:
http_access allow all
或需要指定ip才能连上的话,先添加一个acl定义:
acl linode src 8.8.8.8 (你的ip地址)
http_access allow linode (你的ip地址)
改然重启就OK了:
sudo service squid3 restart
如果需要去掉 X-Forwarded-For 和 vary 头部,需要添加配置
via off
forwarded_for off
follow_x_forwarded_for deny all
request_header_access X-Forwarded-For deny all
header_access X_Forwarded_For deny all
request_header_access Cache-Control deny all