Skip to content

refactor: move transport TLS config into inner state#99

Merged
shenjinti merged 3 commits intomainfrom
fix/tls-sni-followup
Feb 28, 2026
Merged

refactor: move transport TLS config into inner state#99
shenjinti merged 3 commits intomainfrom
fix/tls-sni-followup

Conversation

@yeoleobun
Copy link
Collaborator

@yeoleobun yeoleobun commented Feb 28, 2026

Follow-up to #98 from @wokalski.

This keeps Wojtek Czekalskis TLS SNI preservation fix, but narrows the TransportLayer API shape by storing outbound TLS config inside TransportLayerInner instead of exposing it as a new public field on TransportLayer.

Changes in this follow-up:

  • move tls_config into TransportLayerInner as internal mutable state
  • simplify duplicated hostname fallback logic in tls.rs

This PR is intended as a small source-only refinement on top of #98, while preserving the original authors fix and attribution.

wokalski and others added 3 commits February 27, 2026 16:41
Domain names were lost during DNS resolution in lookup(), causing
TlsConnection::connect to see only IP addresses and omit the SNI
extension. Servers requiring SNI rejected with handshake_failure (alert 40).

Now captures the original domain before resolution and passes it as
sni_hostname through TlsConfig. Also wires TlsConfig into connect()
to support CA certs, client certs, and explicit SNI override.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@shenjinti shenjinti merged commit 8993564 into main Feb 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants