У меня есть Squid 3.5.23, работающий на Debian Stretch, перекомпилированный из источника deb и настроенный как прозрачный прокси. Я изменил конфигурацию, чтобы разрешить проксирование SSL, и, похоже, он работает нормально, когда я устанавливаю сгенерированный сертификат Squid в качестве доверенного корневого центра. Facebook, Google, Kernel.org и большинство других сайтов HTTPS проходят через OK, и браузер правильно считает, что центром сертификации этих сайтов является прокси. Теперь НЕКОТОРЫЕ сайты выдают мне предупреждение о сертификате, а затем сообщение об ошибке, если я принимаю его как исключение.
The following error was encountered while trying to retrieve the URL: https://2.16.189.72/*
Failed to establish a secure connection to 2.16.189.72
The system returned:
(71) Protocol error (TLS code: SQUID_ERR_SSL_HANDSHAKE)
Handshake with SSL server failed: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
This proxy and the remote host failed to negotiate a mutually acceptable security settings for handling your request. It is possible that the remote host does not support secure connections, or the proxy is not satisfied with the host security credentials.
https://wiki.squid-cache.org/ (Сейчас который иронично) -> При попытке получить URL-адрес произошла следующая ошибка: https://master.squid-cache.org/*
Failed to establish a secure connection to 104.130.201.120
The system returned:
(71) Protocol error (TLS code: X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY)
SSL Certficate error: certificate issuer (CA) not known: /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
This proxy and the remote host failed to negotiate a mutually acceptable security settings for handling your request. It is possible that the remote host does not support secure connections, or the proxy is not satisfied with the host security credentials.
Я сгенерировал сертификат с помощью следующих команд:
openssl req -new -newkey rsa: 4096 -days 3650 -nodes -x509 \ -keyout mycompany.pem -out mycompany.pem openssl x509 -in mycompany.pem -outform DER -out mycompany.der / usr / lib / squid / ssl_crtd -c -s / etc / squid / certs / ssl_db -M 4MB chown -R proxy.proxy ssl_db
Подсказки?
В конце концов, я решил проблему, установив Squid 4.0.21 (на данный момент все еще являющийся бета-версией), в котором есть код для обработки этих отсутствующих сертификатов, как это делают браузеры. Подробнее на этой странице в вики Squid.