Skip to content

Commit d5f0179

Browse files
committed
feat: add wireshark logfile util
1 parent e9fd5d3 commit d5f0179

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib.go

+7
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ func TestHTTPClient(options ...gokhttp_client.Option) (*http.Client, error) {
3232
}
3333
opts = append(opts, opt)
3434
}
35+
if os.Getenv("USE_WIRESHARK") == "true" {
36+
opt, err := gokhttp_client.NewTLSKeyLoggingOptionToFile(os.Getenv("WIRESHARK_LOGFILE"))
37+
if err != nil {
38+
return nil, fmt.Errorf("gokhttp_client.NewTLSKeyLoggingOptionToFile: %w", err)
39+
}
40+
opts = append(opts, opt)
41+
}
3542

3643
opts = append(opts, options...)
3744

0 commit comments

Comments
 (0)