Skip to content

caddytls: Fix sni_regexp matcher to obtain layer4 contexts #6804

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

Merged
merged 2 commits into from
Jan 25, 2025

Conversation

vnxme
Copy link
Contributor

@vnxme vnxme commented Jan 24, 2025

This PR is the mainline part of the fix described here for the issue with missing {tls.regexp.*} placeholders reported here.

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.

Do you think we could refactor this and simplify it a bit by first trying to get a context, and then if we do, THEN get the replacer from it?

i.e. something like:

var ctx context.Context
// try to set ctx
// if ctx is not nil, try to get replacer
// if replacer is nil, just use NewReplacer

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.

Looks good!! Thanks!

@mholt mholt merged commit 7b8f350 into caddyserver:master Jan 25, 2025
33 checks passed
@vnxme vnxme deleted the caddytls-sni-regexp-fix branch January 27, 2025 11:13
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.

2 participants