Skip to content

fix: validate host certificates before selecting IPs - #319

Open
xuyua9 wants to merge 1 commit into
521xueweihan:mainfrom
xuyua9:codex/github520-tls-sni-guard
Open

fix: validate host certificates before selecting IPs#319
xuyua9 wants to merge 1 commit into
521xueweihan:mainfrom
xuyua9:codex/github520-tls-sni-guard

Conversation

@xuyua9

@xuyua9 xuyua9 commented Aug 13, 2026

Copy link
Copy Markdown

Summary

  • Validate each DNS candidate over HTTPS with the requested hostname as SNI.
  • Reject connection or certificate failures before latency-based IP selection.

Context

Issue: #310

The issue reports an incorrect IP serving a certificate for another hostname. The current updater selects the fastest TCP-connected address without checking the certificate hostname.

This PR is intentionally limited to TLS/SNI candidate validation. It does not duplicate the invalid-payload publication guard in open PR #315.

Validation

  • Offline mock regression covers valid TLS, certificate mismatch, and connection failure.
  • Python syntax compilation.
  • git diff --check

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.

1 participant