I would like to configure squid to cache SSL / TLS content. I've done it before, but cannot get it working. I have squid installed and this is my conf:
When configuring my proxy server in firefox and navigating to https://lxer.com, I get:
I imported the same cert.pem in my /usr/local/etc/squid/cert.pem into firefox.
With my configuration above, I get this error:
Prior to the transparent proxy error, my config was (the relevant bits):
I generated the squid cache dirs prior to starting squid:
Code:
acl localnet src 10.30.0.0/24
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 901 # SWAT
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager
http_access allow localhost
http_access deny to_localhost
http_access deny to_linklocal
http_access deny all
#http_port 3128
https_port 3128 ssl-bump tls-cert=/usr/local/etc/squid/cert.pem tls-key=/usr/local/etc/squid/key.pem generate-host-certificates=on dynamic_cert_mem_cache_size=4MB
ssl_bump bump all
cache_dir ufs /var/cache/squid 100 16 256
coredump_dir /var/cache/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
When configuring my proxy server in firefox and navigating to https://lxer.com, I get:
Code:
2026/01/18 12:32:02 kid1| ERROR: Cannot accept a TLS connection
problem: failure
error detail: SQUID_TLS_ERR_ACCEPT+TLS_LIB_ERR=A0000C6+TLS_IO_ERR=1
I imported the same cert.pem in my /usr/local/etc/squid/cert.pem into firefox.
With my configuration above, I get this error:
Code:
Performing sanity check on squid configuration.
2026/01/18 12:37:21| Processing Configuration File: /usr/local/etc/squid/squid.conf (depth 0)
2026/01/18 12:37:21| FATAL: ssl-bump on https_port requires tproxy/intercept which is missing.
2026/01/18 12:37:21| Not currently OK to rewrite swap log.
2026/01/18 12:37:21| storeDirWriteCleanLogs: Operation aborted.
2026/01/18 12:37:21| FATAL: Bungled /usr/local/etc/squid/squid.conf line 29: https_port 3128 ssl-bump tls-cert=/usr/local/etc/squid/cert.pem tls-key=/usr/local/etc/squid/key.pem generate-host-certificates=on dynamic_cert_mem_cache_size=4MB
2026/01/18 12:37:21| Squid Cache (Version 7.3): Terminated abnormally.
CPU Usage: 0.010 seconds = 0.010 user + 0.000 sys
Maximum Resident Size: 69696 KB
Page faults with physical i/o: 0
Prior to the transparent proxy error, my config was (the relevant bits):
Code:
https_port 3128 cert=/usr/local/etc/squid/cert.pem key=/usr/local/etc/squid/key.pem
I generated the squid cache dirs prior to starting squid:
Code:
squid -z