Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tls.WithDestination ignoring IP address #3177

Merged
merged 1 commit into from
Oct 12, 2024

Conversation

dyhkwong
Copy link
Contributor

@dyhkwong dyhkwong commented Oct 2, 2024

ServerName should be filled with server address if tlsSettings.serverName is not specified.

ServerName is used to verify the hostname on the returned certificates unless InsecureSkipVerify is given. It is also included in the client's handshake to support virtual hosting unless it is an IP address.

It is rare to have a certificate with IP addresses as Subject Alternate Name. However, this is indeed a bug, and this can be tested with self-signed certificates. Maybe the original author confused ServerName with SNI.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 38.71%. Comparing base (5ca0f36) to head (b16e7f0).
Report is 2 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3177      +/-   ##
==========================================
+ Coverage   38.68%   38.71%   +0.03%     
==========================================
  Files         760      760              
  Lines       43598    43605       +7     
==========================================
+ Hits        16867    16883      +16     
+ Misses      24878    24872       -6     
+ Partials     1853     1850       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@xiaokangwang xiaokangwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! I think this pull request is ready to be merged in the next release.

@xiaokangwang xiaokangwang merged commit 5ffbc02 into v2fly:master Oct 12, 2024
38 of 39 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