session.onkeylog


  • 类型:quic.OnKeylogCallback

当 TLS 密钥材料可用时要调用的回调。要求 sessionOptions.keylogtrue。每次调用接收一行 NSS 密钥日志格式 文本(包括结尾的换行符)。这对于使用 Wireshark 等工具解密数据包捕获非常有用。可读/可写。

🌐 The callback to invoke when TLS key material is available. Requires sessionOptions.keylog to be true. Each invocation receives a single line of NSS Key Log Format text (including a trailing newline). This is useful for decrypting packet captures with tools like Wireshark. Read/write.

也可以通过 quic.connect()quic.listen() 中的 onkeylog 选项进行设置。

🌐 Can also be set via the onkeylog option in quic.connect() or quic.listen().