Sign inSign up

eraa/squid-ssl

By eraa

•Updated about 2 years ago

squid proxy with enable ssl-bump, https_port, icap

Image
Networking
Developer tools
1

460

eraa/squid-ssl repository overview

⁠Information

Base image: alpine:3.20.2
Squid version: squid-6.9

There is custom squid with enable ssl-bump, https_port and icap see here for more details: http://www.squid-cache.org/Doc/config/⁠

⁠Simple usage with docker compose or docker run

Docker run: docker run -p3128:3128 -p3129:3129 -p3126:3126 -p3127:3127 --rm -it eraa/squid-ssl:v6 My default rootCA: rootCA.crt⁠

⁠1. compose.yml
services:
  squid:
    image: eraa/squid-ssl:v6
    ports:
      - "3128:3128"
      - "3129:3129"
      - "3126:3126"
      - "3127:3127"
    volumes:
      - "${PWD}/squid.conf:/opt/squid/etc/squid.conf"
      - "${PWD}/certs:/opt/squid/ssl_cert"
⁠2. squid.conf
# Temporary allow all traffic
http_access allow all

# SSL Bump
ssl_bump bump all

# Ignore cert error
sslproxy_cert_error allow all

# http proxy
http_port 3128

# http proxy with ssl-bump
http_port 3129 ssl-bump cert=/opt/squid/ssl_cert/myRootCA.pem

# https proxy
https_port 3126 cert=/opt/squid/ssl_cert/myRootCA.pem

# https proxy with ssl-bump
https_port 3127 intercept ssl-bump cert=/opt/squid/ssl_cert/myRootCA.pem

# Setup ssl-db
sslcrtd_program /opt/squid/libexec/security_file_certgen -s /opt/squid/ssl_db -M 4MB
sslcrtd_children 3 startup=1 idle=1
⁠3. Generate root CA doc: Microsoft-self-signed-certificates⁠

Create private key:

openssl ecparam -out myRootCA.key -name prime256v1 -genkey

Create certificate sign request

openssl req -new -sha256 -key myRootCA.key -out myRootCA.csr

Create certificate

openssl x509 -req -sha256 -days 365 -in myRootCA.csr -signkey myRootCA.key -out myRootCA.crt

Prepare root CA pem file:

cat myRootCA.key > myRootCA.pem
cat myRootCA.crt >> myRootCA.pem

⁠Source

Want to create custom image: d-hieu-00/squid-ssl⁠

Tag summary

Content type

Image

Digest

sha256:f4bb8be51…

Size

40.6 MB

Last updated

about 2 years ago

docker pull eraa/squid-ssl:v6