Text Mode
--model text reconstructs application messages from packets and TLS secrets. Since v2.11.0, pcapng is the default text source for all three core TLS modules. The name describes the input to the decoder. A pcapng file is written only when you specify --pcapfile.
sudo ecapture tls --model text --text-source pcapng
sudo ecapture gotls --elfpath ./go-client --model text --text-source pcapng
sudo ecapture gnutls --model text --text-source pcapngRead a message
The decoder reassembles the TCP stream and waits for secrets that can arrive after their packets. It can report complete HTTP/1.x and HTTP/2 messages, supported WebSocket messages, and HTTP/3 over QUIC v1/v2 when the TLS backend supplies the necessary secrets. Include UDP traffic for HTTP/3. With --text-source hook, eCapture instead emits the plaintext chunks seen at individual TLS read/write calls. Live decryption reference
Each terminal line identifies an event or operational log. A decoded HTTP event includes the available direction, timestamp, endpoints and connection identity. HTTP/2 and HTTP/3 can have multiple streams per connection. Use the stream ID to distinguish them. PID, process name, arguments and non-secret handshake details such as SNI, ALPN and cipher are available when observed. With --output stdout --output session.jsonl, the file preserves the v2 structure and its event_payload.text.payload is a bytes field encoded as base64 in JSON. Text output example
Select the decoder for your application
The following options apply to --model text --text-source pcapng. Choose one of raw bytes, incremental HTTP events or an explicit application parser.
| Option | When to use it |
|---|---|
--text-raw | Inspect authenticated TLS bytes, QUIC STREAM chunks with offsets or complete QUIC DATAGRAM messages. |
--text-http-events | Observe HTTP headers and body chunks as they arrive, including SSE and HTTP/2 gRPC. gRPC payloads retain their schema-free Protobuf bytes. |
--text-max-decoded-body N | With HTTP events, limit gzip expansion to N bytes per message. Zero retains compressed data. |
--text-protocol dot, doh, doq, mqtt or redis | Select DNS over TLS, HTTPS or QUIC, MQTT 3.1.1, or fixed-length Redis RESP2/RESP3. The selection is explicit. |
--text-tls-upgrade | Follow one smtp, imap, pop3, ldap, postgres, mysql, connect or https-connect negotiation. Use raw output for subsequent application bytes if there is no parser. HTTPS CONNECT handles one inner TLS layer. |
--text-udp-protocol dtls | Select DTLS 1.2 with ECDHE-RSA and AES-128/256-GCM. UDP normally uses QUIC. |
This example captures incremental gRPC events from a Go service on loopback.
sudo ecapture gotls --elfpath ./go-server --model text --text-source pcapng \
--text-http-events -i lo --output stdout --output grpc.jsonlRun a known RPC and check for the expected HTTP/2 stream and message data. A standalone gRPC message has no field names without its .proto schema. The current probes do not supply the ECH material needed for live ECH decryption. Decoder configuration · Protocol coverage
Check what the SDK received
Add --pcapfile session.pcapng to keep the bytes sent to the SDK. Add --keylogfile session.keys if you also need a standalone key log. Both files are optional and must be distinct from each other and from any JSON Lines output. Check the expected request in Wireshark using the embedded-secret workflow. A connection diagnostic can concern just one flow. Unexpected termination of the decryption pipeline stops capture and returns a nonzero exit status. Decryption and diagnostics