Setup server
Install squid
apt update
apt install squid squid-commonSetup squid
Allow all (not recommended for production)
Edit config file:
nano /etc/squid3/squid.confFind the following line:
http_access deny allBEFORE this line add:
acl all src 0.0.0.0/0
http_access allow allBasic auth
Edit config file:
nano /etc/squid3/squid.confFind the following line:
http_access deny allBEFORE this line add:
acl all src 0.0.0.0/0
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwords
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticatedAdd user
Run:
htpasswd -c /etc/squid3/passwords YOUR-USER-NAME-HEREInput your password twice.
Setup client
export http_proxy="http://USER:PASSWORD@PROXY-HOST:3128"
export https_proxy="http://USER:PASSWORD@PROXY-HOST:3128"
export ftp_proxy="http://USER:PASSWORD@PROXY-HOST:3128"
export no_proxy="localhost,127.0.0.1,::1"
curl http://www.google.comLast updated