A deep dive into cella's HTTPS interception architecture: nftables, TLS MITM, CA injection, and traffic auditing.
You want to see what HTTPS requests a container is making β but TLS encrypts everything. You can't just sniff the network. Traditional HTTP proxies require changing the application's proxy settings, which is invasive and doesn't work for all software.
cella uses nftables PREROUTING REDIRECT to invisibly intercept traffic at the kernel level. No proxy configuration needed in the container.
SO_ORIGINAL_DST from the socket to determine where the traffic was originally headedContainer ββ[HTTPS]βββ nftables REDIRECT βββ cella listener
β
βββββββ΄ββββββ
β TLS MITM β
β (forged β
β cert) β
βββββββ¬ββββββ
β
βββββββ΄ββββββ
β Real TLS β
β to upstreamβ
βββββββββββββ
For TLS to work, the container must trust cella's root CA. cella's autosetup module handles this automatically:
/usr/local/share/ca-certificates/cella-ca.crtupdate-ca-certificates inside the containerNODE_EXTRA_CA_CERTS for Node.js applicationsThe MITM handler supports HTTP/2 via ALPN negotiation. When the upstream server supports h2, cella negotiates h2 on both sides of the proxy.
For AI API calls that use Server-Sent Events (SSE), cella's inference stats module parses the streaming response chunks in real time to extract model names, token counts, and completion data β all without buffering the entire response.
Pressing u in the Audit panel removes the nftables rule and the CA certificate, returning the container to its original state.