Skip to main content

Squid Proxy

simple proxy server

Docker Compose

---
version: "3"
services:
proxy:
container_name: proxy-server
image: ubuntu/squid
ports:
- "3128:3128"
volumes:
- /docker-data/squid/squid.conf:/etc/squid/squid.conf
restart: always

Config

change http_access deny all to http_access allow all

# squid.conf

acl SSL_ports port 443
http_access deny !Safe_ports

http_access allow localhost manager
http_access deny manager


include /etc/squid/conf.d/*.conf

http_access allow localhost


http_access allow all

http_port 3128

coredump_dir /var/spool/squid


refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
refresh_pattern \/Release(|\.gpg)$ 0 0% 0 refresh-ims
refresh_pattern \/InRelease$ 0 0% 0 refresh-ims
refresh_pattern \/(Translation-.*)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
refresh_pattern . 0 20% 4320