DevOps Buzz
Search…
Bash / Shell
Bitbucket
Distros
Elasticsearch
General
Guidelines / Standards
microk8s
Prometheus
RabbitMQ
VirtualBox
Setup server

Install squid

1
apt update
2
apt install squid squid-common
Copied!

Setup squid

Edit config file:
1
nano /etc/squid3/squid.conf
Copied!
Find the following line:
1
http_access deny all
Copied!
BEFORE this line add:
1
acl all src 0.0.0.0/0
2
http_access allow all
Copied!

Basic auth

Edit config file:
1
nano /etc/squid3/squid.conf
Copied!
Find the following line:
1
http_access deny all
Copied!
BEFORE this line add:
1
acl all src 0.0.0.0/0
2
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwords
3
auth_param basic realm proxy
4
acl authenticated proxy_auth REQUIRED
5
http_access allow authenticated
Copied!

Add user

Run:
1
htpasswd -c /etc/squid3/passwords YOUR-USER-NAME-HERE
Copied!
Input your password twice.

Setup client

1
export http_proxy="http://USER:[email protected]:3128"
2
export https_proxy="http://USER:[email protected]:3128"
3
export ftp_proxy="http://USER:[email protected]:3128"
4
export no_proxy="localhost,127.0.0.1,::1"
5
curl http://www.google.com
Copied!