Configure HTTP proxy server via Squid
This article is original, reproduced please indicate the source
Installation
shell
apt install squid
Configuration
txt
# listening port
http_port 80
# Cache
#cache_mem 10000
#cache_dir ufs /var/spool/squid 1000 16 256
# basic_ncsa_auth
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
acl foo proxy_auth REQUIRED
http_access deny !foo
http_access allow foo
http_access deny all
Configure username and password
WARNING
There seems to be an issue with letter case for the password configuration that has not been resolved
shell
apt install apache2-utils
shell
sudo htpasswd -c /etc/squid/passwd USERNAME
Startup
shell
sudo systemctl restart squid