monie icon indicating copy to clipboard operation
monie copied to clipboard

Add env variables for custom certificate and key

Open sverch opened this issue 6 years ago • 2 comments

MONIE_KEY_FILE and MONIE_CERT_FILE can be used to control what certificate is served up by this server.

Taken mostly from https://github.com/ctz/hyper-rustls/blob/master/examples/server.rs.

sverch avatar Oct 27 '19 04:10 sverch

@sverch will this be useful because you are not using authority meaning it will be valid for only 1 authority. As it is mitm proxy i suppose it can mitm many other domains?

shirshak55 avatar Jun 16 '20 17:06 shirshak55

@shirshak55 My main use case here was being able to trust the certificate served up by this proxy on my system, because I wanted to man in the middle but I didn't want to figure out how to get each client application to trust it. Since it creates a self signed certificate on demand I couldn't figure out how to trust it without this change.

You're right that this does limit the domains the certificate will be valid for. Ideally I'd like to have a CA certificate I can trust that this proxy uses to generate certificates, but that seems more involved.

sverch avatar Jun 26 '20 15:06 sverch