Squid:透明SSL代理的总线错误

时间:2015-12-02 16:31:00

标签: ssl proxy transparent squid

我尝试配置squid(在openwrt上运行)作为ssl连接的透明代理。虽然"正常"当我尝试使用ssl连接运行它时,非ecrypted连接工作正常的鱿鱼总是崩溃。

我的配置如下:

https_port 3129 intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/opt/ssl/ssl.pem key=/opt/ssl/ssl.pem              
ssl_bump server-first all

但每当我尝试启动鱿鱼时,我只会遇到一行错误:

Bus error

我正在使用Squid 3.5.2-2,调试日志如下所示:

2015/12/02 17:28:42.021| Initializing https proxy context
2015/12/02 17:28:42.026| support.cc(1068) method: Using SSLv2/SSLv3.
2015/12/02 17:28:42.029| support.cc(1200) sslCreateClientContext: Setting RSA key generation callback.
2015/12/02 17:28:42.029| support.cc(1204) sslCreateClientContext: NOTICE: Peer certificates are not verified for validity!
2015/12/02 17:28:42.030| support.cc(1211) sslCreateClientContext: Setting CA certificate locations.
2015/12/02 17:28:42.030| Initializing https_port [::]:3129 SSL context
2015/12/02 17:28:42.030| Using certificate in /opt/ssl/ssl.pem
2015/12/02 17:28:42.034| support.cc(1714) readSslX509CertificatesChain: Certificate is self-signed, will not be chained
2015/12/02 17:28:42.093| support.cc(1533) contextMethod: Using SSLv2/SSLv3.
2015/12/02 17:28:42.096| support.cc(855) configureSslContext: Setting RSA key generation callback.
2015/12/02 17:28:42.098| support.cc(858) configureSslContext: Setting CA certificate locations.
2015/12/02 17:28:42.100| support.cc(901) configureSslContext: Not requiring any client certificates
2015/12/02 17:28:42.101| tools.cc(543) leave_suid: leave_suid: PID 6477 called
2015/12/02 17:28:42.103| tools.cc(565) leave_suid: leave_suid: PID 6477 giving up root, becoming 'nobody'
2015/12/02 17:28:42.106| debug.cc(403) parseOptions: command-line -X overrides: ALL,1
Bus error

所以现在我的问题是:为什么鱿鱼甚至没有开始?是什么导致了总线错误?

1 个答案:

答案 0 :(得分:-2)

我很确定这是一个空间问题,尝试减少动态证书的大小:

dynamic_cert_mem_cache_size=1MB

你的Squid配置文件中的这个选项也很有用:

sslproxy_session_cache_size 500 KB

如果您仍然遇到总线错误,请使用 opkg 安装 strace 并尝试使用Squid。您将获得有关正在发生的事情的更多日志。