Skip to content
This repository was archived by the owner on Jul 3, 2025. It is now read-only.

fix(netcore): allow for utls-aware structured logs#73

Merged
bassosimone merged 3 commits intomainfrom
fix/utls
Mar 14, 2025
Merged

fix(netcore): allow for utls-aware structured logs#73
bassosimone merged 3 commits intomainfrom
fix/utls

Conversation

@bassosimone
Copy link
Member

@bassosimone bassosimone commented Mar 14, 2025

This diff modifies Network in a backwards compatible way to add a new optionally-nil field named TLSEngine.

This field is now the preferred way for creating a new TLSConn while the previous NewTLSClientConn field, which is still supported, has now become deprecated.

The problem we want to solve is that of making sure the name of the TLS engine and the parrot being used are inside of the structured logs.

With TLSEngine, which is an interface, we know that, via the Name() and Parrot() methods.

With NewTLSClientConn, we don't know, hence we set both to "unknown".

This diff modifies `Network` in a backwards compatible way to
add a new optionally-nil field named `TLSEngine`.

This field is now the preferred way for creating a new `TLSConn`
while the previous `NewTLSClientConn` field, which is still
supported, has now become deprecated.

The problem we want to solve is that of making sure the name
of the TLS engine and the parrot being used are inside of the
structured logs.

With `TLSEngine`, which is an interface, we know that.

With `NewTLSClientConn`, we don't know.
@codecov
Copy link

codecov bot commented Mar 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
netcore/network.go 100.00% <ø> (ø)
netcore/tlsdialer.go 100.00% <100.00%> (+0.94%) ⬆️
netcore/tlsengine.go 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bassosimone bassosimone merged commit be289da into main Mar 14, 2025
4 checks passed
@bassosimone bassosimone deleted the fix/utls branch March 14, 2025 11:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant