TunnelVision

0007 — Decrypted content: its own switch, its own (shorter) retention, its own deletion

Context

TLS inspection produces plaintext: the actual contents of the user’s own HTTPS traffic. Piece 2 of the Road to v1 inspection plan gave it somewhere to go (../spec/plaintext.md): its own files, its own directory, bounded per record and per flow/direction. What none of that answers is how long any of it stays, and that is a different kind of question — the most privacy-sensitive one in the project.

Three things forced a decision before anything could start writing:

  1. Inspection and persistence are not the same act. Turning inspection on lets the user see who is being talked to and lets a flow be decoded at all. Writing that decoded content to disk is a second, larger commitment: it turns a live view into a durable record of what the user read, typed and received.
  2. The existing retention was designed for captures, whose contents travelled encrypted. One week of .pcap files is a very different object from one week of plaintext, even though both sit in the same container under the same disk encryption.
  3. “Clear everything” in Settings is all-or-nothing today, so a user who regrets having recorded decrypted content has to throw away their whole history to get rid of it.

Decision

(1) Persisting plaintext is its own switch, separate from tlsInspectionEnabled and off by default, even when inspection is on. Inspection without it decodes for the live session and keeps nothing.

(2) Decrypted content has its own retention, and it is shorter — and it can never be unlimited. Its ages are oneHour / oneDay / oneWeek, defaulting to one day, against the captures’ one week (and their unlimited option, which does not exist here). On top of the user’s age there is a fixed ceiling the user cannot raise, applied by the same sweep: decrypted content never occupies more than a bounded amount of disk regardless of settings.

(3) Decrypted content can be deleted on its own, without touching the history or the captures — a separate action, and the only one of the three that removes what it removes.

Everything above sits on top of the bounds already in place: 64 KiB per direction per flow, a per-record cap, and rotating files.

Consequences

Alternatives considered