Squid配置http代理服务器
本文原创,转载请注明出处
安装
shell
apt install squid
配置
txt
# 监听端口
http_port 80
# 缓存
#认证方式
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwd
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 24 hours
#访问控制列表
acl foo proxy_auth REQUIRED
http_access deny !foo
http_access allow foo
http_access deny all
配置用户名密码
WARNING
密码配置似乎存在字母大小写的问题,尚未解决
shell
apt install apache2-utils
shell
sudo htpasswd -c /etc/squid/passwd USERNAME
启动
shell
sudo systemctl restart squid