Sign inSign up

pikamonvvs/squid-ubuntu

By pikamonvvs

Updated over 2 years ago

A Squid proxy server based on Ubuntu 22.04

Image
Networking
Web servers
0

74

pikamonvvs/squid-ubuntu repository overview

A Squid Proxy on Ubuntu

1. Description

This is a Squid Proxy server based on Ubuntu 22.04.

The overall specifications are below.

Ubuntu version: 22.04 LTS
Squid version: 5.7
Protocol: HTTP
Port: 3128

2. How to use (Usage)

You can use it by pulling and running it.

docker pull pikamonvvs/squid-ubuntu:1.0
docker run -it -d --name [container_name] -p 3128:3128 pikamonvvs/squid-ubuntu:1.0

When starting container, it automatically starts the proxy server.

3. Default User Account

It is configured so that only users registered on htpass can access the proxy server.

But I made a temporary user into it for test.

< Default User Account >
Username: test
Password: test

And you can use this command below to change the default account to your own.

docker exec [container_id] htpasswd -bc /etc/squid/passwd [username] [password]

Enjoy using it!


Appendix A.

I used this script below to build this image.

[host-side]
docker pull ubuntu:22.04
docker run -it --name squid -p 3128:3128 ubuntu:22.04

[container-side]
apt update
apt install -y squid apache2-utils
mv /etc/squid/squid.conf /etc/squid/squid.conf.default
echo -e "http_port 3128\n"\
	"\n"\
	"acl all src all\n"\
	"\n"\
	"auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwd\n"\
	"auth_param basic children 5\n"\
	"auth_param basic realm Squid proxy-caching web server\n"\
	"auth_param basic credentialsttl 12 hours\n"\
	"acl auth_users proxy_auth REQUIRED\n"\
	"http_access allow auth_users" > /etc/squid/squid.conf
htpasswd -c /etc/squid/passwd test
echo "service squid start" >> ~/.bashrc
exit

[host-side]
docker commit squid pikamonvvs/squid-ubuntu:1.0

Tag summary

Content type

Image

Digest

sha256:c3624f500

Size

92.6 MB

Last updated

over 2 years ago

docker pull pikamonvvs/squid-ubuntu:1.0