Wireshark is a great tool for examining network traffic, but since QUIC payloads are encrypted, we need some private key material to decrypt QUIC traffic in the tool.
How can I decrypt QUIC traffic from solana-test-validator
?
Wireshark exposes the ability to set TLS keys, which are used for QUIC traffic.
Rustls (the TLS provider used by solana-test-validator
) exposes a way to dump the TLS key file using the SSLKEYLOGFILE
environment variable, so you simply need to run:
SSLKEYLOGFILE=/path/to/keylog.txt solana-test-validator
After that, you need to paste that file into "Edit > Preferences > Protocols > TLS > (Pre)-Master-Secret log filename:" in Wireshark, and then you'll see decrypted QUIC traffic from your test validator.
More information at https://stackoverflow.com/questions/40779073/decrypting-quic-udp-payloads-in-wireshark