Skip to content

Conversation

@WeidiDeng
Copy link
Member

@WeidiDeng WeidiDeng commented Apr 16, 2025

This way when using placeholders to establish tls connections, the performance can be significantly improved.

Also reduced the amount of codes that replicate the transport.

@francislavoie francislavoie changed the title reverse_proxy: use DialTLSContext to establish tls connections if servername has pla… reverseproxy: use DialTLSContext for TLS if servername has placeholder Apr 17, 2025
@mholt
Copy link
Member

mholt commented Apr 22, 2025

Thanks for this!

Does this reduce any functionality though? It uses a single static transport -- definitely more efficient -- but less dynamic, right?

@WeidiDeng
Copy link
Member Author

The only dynamic part that I can think of is the server name placeholder part, which this patch takes care of. I haven't found any thing broken in my setup.

Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

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

I think we can give this a shot then. Thanks for the contribution, and if there's any reported issues, hopefully you can help us with them 😅

@mholt mholt merged commit aa3d20b into master Apr 28, 2025
20 checks passed
@mholt mholt deleted the rp-servername-placeholder branch April 28, 2025 15:14
@francislavoie francislavoie added this to the v2.10.1 milestone Aug 22, 2025
mohammed90 pushed a commit to cedricziel/caddy that referenced this pull request Aug 29, 2025
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.

4 participants