droe / sslsplit

Transparent SSL/TLS interception
https://www.roe.ch/SSLsplit
BSD 2-Clause "Simplified" License
1.75k stars 329 forks source link

Response buffering & manipulation #168

Open NuSkooler opened 7 years ago

NuSkooler commented 7 years ago

I would like to add full support for response buffering and manipulation. My needs are to fully buffer particular responses dependent on findings in headers (for example: Content-Type) and possibly modify, or in some cases fully replace the entire response. Due to the nature of responses, I'd like to add (perhaps pluggable) support for encodings, compression (gzip/brotli) and chunking at a minimum.

I see in the LUA branch that there is the start of something like this but it seems very basic & in the issue tracker there is talk of needs for buffering there as well.

Was this work ever completed in any way? If not, can you provide some pointers as to how you would like to see this fit into the system?

droe commented 6 years ago

Yes, your analysis is right, the LUA branch was a contributed PoC that is too basic to be generally useful. It lacks all the needed infrastructure changes: more complete and general HTTP parsing, request and response caching. I never did the conceptual work on how these should fit into sslsplit so this is green field. Happy to discuss specific proposals. Looking into the future, the solution should also be able to support HTTP/2.