barnacs / compy

HTTP/HTTPS compression proxy
ISC License
204 stars 34 forks source link

Let's Encrypt instructions for .pem files? #74

Open TehDomic opened 3 months ago

TehDomic commented 3 months ago

I have generated Let's Encrypt files on a test server, where I have these .pem files to work with:

$ cat ./README

This directory contains your keys and certificates.

`privkey.pem`  : the private key for your certificate.
`fullchain.pem`: the certificate file used in most server software.
`chain.pem`    : used for OCSP stapling in Nginx >=1.3.7.
`cert.pem`     : will break many server configurations, and should not be used
                 without reading further documentation (see link below).

WARNING: DO NOT MOVE OR RENAME THESE FILES!
         Certbot expects these files to remain in this location in order
         to function properly!

We recommend not moving these files. For more information, see the Certbot
User Guide at https://certbot.eff.org/docs/using.html#where-are-my-certificates.

Which of these are compatible/should be used with the various cert/ca/key flags or the software itself of compy?

TehDomic commented 3 months ago

Info: The certbot Let' Encrypt certificate Key Type is: ECDSA, if that helps explain things.

TehDomic commented 3 months ago

Debugging: Running compy with these flags as a test: ./compy -cert /etc/letsencrypt/live/<my.domain>/fullchain.pem -key /etc/letsencrypt/live/<my.domain>/privkey.pem

And turning on Proxy Settings in Windows, then trying to access a few websites, returns this message in the test server terminal output:

2024/03/19 00:07:41 compy listening on :9999
2024/03/19 00:09:47 http: TLS handshake error from <IP adress>:****6: tls: first record does not look like a TLS handshake
2024/03/19 00:09:49 http: TLS handshake error from <IP adress>:****7: tls: first record does not look like a TLS handshake

etc until I shut down the script with Ctrl+C on the server.