安装
sudo apt install squid
配置,在 /etc/squid/squid.conf 中添加或修改:
# 设置匿名代理 forwarded_for delete via off # 修改监听端口 http_port 3128 # 允许本地网络访问 acl localnet src 10.0.0.0/8 # RFC1918 possible internal network acl localnet src 172.16.0.0/12 # RFC1918 possible internal network acl localnet src 192.168.0.0/16 # RFC1918 possible internal network acl localnet src fc00::/7 # RFC 4193 local private network range acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines http_access allow localnet # 去掉本地网络访问权限的注释 # 自定义一个名为walker的控制组,并允许此控制组。 acl walker src 99.0.0.0/8 # 99段的A类地址 acl walker src 5.4.3.2/32 # 单个IP地址5.4.3.2 http_access allow walker # 允许walker组 # 修改或添加 dns dns_nameservers 223.5.5.5 119.29.29.29 114.114.114.114
重启服务
sudo systemctl restart squid.service # or sudo systemctl restart squid
*** walker ***
Ubuntu Server 18.04 与 Squid 3.5.x
原文地址:http://blog.51cto.com/walkerqt/2122915