Squid 4.10 的透明代理不起作用

Squid 4.10 的透明代理不起作用

Ubuntu Server 20.04 上的 Squid 4.10

我尝试了很多方法,花了整整一周的时间研究如何实现这一点。要了解我在这里尝试做什么,请查看以下帖子:

https://www.reddit.com/r/HomeNetworking/comments/l9049f/https_squid_proxy_w_cache/

和这里:

https://www.reddit.com/r/HomeNetworking/comments/laa68y/squid_410_on_ubuntu_server_2004_transparent_proxy/

编辑:基本上,我正在尝试设置一个带缓存的 HTTPS 透明代理。ssl-bump 将解密数据并将其存储在缓存中。但每当我使用 Firefox 浏览器中的 https 代理设置进行连接时,我都会收到 TLS_DENIED_ABORTED/200 或 NONE/200 或 TLS_DENIED/400。Squid 正在运行,缓存目录已创建,并且解析配置时没有错误。在squid -r reconfigure您说任何话之前,我已经知道了。

刚刚读到一条评论说:

总的来说,这是一个坏主意,因为你试图破坏 TLS 功能,而这在最新版本 TLS1.3 中是不可能实现的,甚至现在也无法与 HSTS 一起使用。

听起来好像很难做到......

无论如何,这是我当前的 squid.conf:

# ACCESS LISTS
acl localnet src 0.0.0.1-0.255.255.255  # RFC 1122 "this" network (LAN)
acl localnet src 192.168.5.0/24     # RFC 1918 local private network (LAN)
acl laptop src 192.168.5.114

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 CONNECT method CONNECT

# HTTP ACCESS 
http_port 3128 
http_port 3129 intercept 
https_port 3130 intercept ssl-bump cert=/etc/squid/ssl_cert/proxyCA.pem generate-host-certificates=on dynamic_cert_mem_cache_size=4MB

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny manager
include /etc/squid/conf.d/*
http_access allow laptop
http_access allow localnet
http_access allow localhost
http_access allow manager localhost
http_access allow all

# SQUID CACHE DUMP DIR
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

# SSL BUMPING 
sslcrtd_program /usr/lib/squid/security_file_certgen -s /var/lib/ssl_db -M 4MB
sslcrtd_children 5
#acl step1 at_step SslBump1
#ssl_bump peek step1
#ssl_bump bump all

# TEST
acl step1 at_step SslBump1
acl step2 at_step SslBump2
acl step3 at_step SslBump3

ssl_bump stare step2
ssl_bump bump step3

# BYPASS SSL ERROR (not recommended)
sslproxy_cert_error allow all

# SQUID CACHE DIRECTORY AND SIZE
cache_dir aufs /var/spool/squid 1000 16 256

# CACHE LOG DIR
cache_log /var/log/squid/cache.log
#cache allow all

# ACCESS LOG DIR
access_log /var/log/squid/access.log

# DNS SETTINGS
dns_nameservers 1.1.1.1 1.0.0.1
dns_v4_first on

抱歉这里信息不足,我已经放弃了,快要撞墙了。我需要一些帮助。

相关内容