Skip to content

Choosing a TLS Probe ​

Relevant source files

The following files were used as context for generating this wiki page:

Purpose and Scope ​

This page provides a technical comparison and decision framework for selecting the appropriate eCapture TLS probe (tls, gotls, or gnutls). Choosing the correct probe depends on the target application's underlying cryptographic library or language runtime, the operating system platform (Linux vs. Android), and the desired output representation (text, keylog, or pcap/pcapng).

Sources: cli/cmd/tls.go:29-48, cli/cmd/gotls.go:28-43, cli/cmd/gnutls.go:33-49


Core TLS Probes Decision Matrix ​

The following decision table maps application runtimes and binary characteristics to the correct eCapture CLI subcommand, internal probe factory type, and bytecode targets.

Target Application StackTarget Library / BinarySupported VersionsSupported PlatformsCLI CommandFactory Probe TypePrimary eBPF Source
OpenSSL / BoringSSLlibssl.so, static binaries, Android Conscrypt (libssl.so)OpenSSL 1.0.x, 1.1.x, 3.x+; BoringSSLLinux (x86_64, aarch64, loongarch64), Android (x86_64, aarch64)ecapture tlsfactory.ProbeTypeOpenSSLkern/openssl*_kern.c, kern/boringssl*_kern.c
Go Native TLSGo compiled ELF binaries (crypto/tls)Go 1.17 – Go 1.26+ (v1/v2 ABI discovery)Linux (x86_64, aarch64, loongarch64), Android (x86_64, aarch64)ecapture gotlsfactory.ProbeTypeGoTLSkern/gotls_kern.c
GnuTLSlibgnutls.soGnuTLS 3.6.x, 3.7.x, 3.8.xLinux (x86_64, aarch64, loongarch64), Android Termux (aarch64)ecapture gnutlsfactory.ProbeTypeGnuTLSkern/gnutls_*_kern.c

Sources: cli/cmd/tls.go:29-61, cli/cmd/gotls.go:28-55, cli/cmd/gnutls.go:33-60, docs/agent/architecture.md:37-49


Probe Selection Architecture ​

The diagram below bridges natural language selection criteria to concrete code entities across the CLI parser, factory registry, and probe initialization packages.

Sources: cli/cmd/tls.go:26-48, cli/cmd/gotls.go:26-43, cli/cmd/gnutls.go:29-49, internal/probe/openssl/openssl_probe.go:44-69, internal/probe/gotls/gotls_probe.go:52-78, internal/probe/gnutls/gnutls_probe.go:39-55


Initialization and Data Flow ​

Once a probe command is invoked, eCapture validates the configuration, selects matching bytecode assets via BaseProbe, and binds eBPF maps to event decoders.

Sources: internal/probe/openssl/openssl_probe.go:102-163, internal/probe/gotls/gotls_probe.go:107-157, internal/probe/gnutls/gnutls_probe.go:80-117, docs/agent/architecture.md:7-26


Detailed Probe Profiles ​

1. OpenSSL and BoringSSL Probe (tls) ​

  • Use Case: Applications dynamically or statically linked against OpenSSL (such as Nginx, cURL, Python, Node.js, PHP) or Google BoringSSL (Android system apps, Chrome).
  • Key Flags: --libssl to specify custom library paths cli/cmd/tls.go:51; --ssl_version to target specific ABI offsets cli/cmd/tls.go:57; -m text|keylog|pcap for output modes cli/cmd/tls.go:53.
  • Implementation Details: Attaches uprobes to SSL write/read entry/exit functions (e.g., SSL_write, SSL_read) or BoringSSL internal master secret logging functions.

Sources: cli/cmd/tls.go:29-61, internal/probe/openssl/openssl_probe.go:44-69

2. Go Native TLS Probe (gotls) ​

  • Use Case: Compiled Go binaries using Go's standard library crypto/tls package. Does not depend on OpenSSL.
  • Key Flags: --elfpath (-e) to point to the target Go binary for symbol and register ABI discovery cli/cmd/gotls.go:46; --perf-reorder for high-throughput ordering cli/cmd/gotls.go:47.
  • Implementation Details: Resolves Go internal function symbols such as crypto/tls.(*Conn).Read, crypto/tls.(*Conn).writeRecordLocked, and crypto/tls.(*Config).writeKeyLog internal/probe/gotls/gotls_probe.go:47-50.

Sources: cli/cmd/gotls.go:28-55, internal/probe/gotls/gotls_probe.go:46-68

3. GnuTLS Probe (gnutls) ​

Sources: cli/cmd/gnutls.go:33-60, internal/probe/gnutls/gnutls_probe.go:39-55

Choosing a TLS Probe has loaded
Download