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

Caddyfile support for TLS handshake matchers #6461

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

vnxme
Copy link
Contributor

@vnxme vnxme commented Jul 17, 2024

This PR is related to mholt/caddy-l4#217. It implements caddyfile support for TLS handshake matchers:

  • local_ip by caddytls.MatchLocalIP
  • remote_ip by caddytls.MatchRemoteIP
  • sni by caddytls.MatchServerName

P.S. I noticed, we have NotRanges in caddytls.MatchRemoteIP, but don't have them in caddytls.MatchLocalIP. Shall we fix this inconsistency as well?

@CLAassistant
Copy link

CLAassistant commented Jul 17, 2024

CLA assistant check
All committers have signed the CLA.

@mholt
Copy link
Member

mholt commented Jul 22, 2024

Thanks! I'm curious where this will be used. The Caddyfile tends to abstract away TLS configuration matching.

@vnxme
Copy link
Contributor Author

vnxme commented Jul 23, 2024

It is a part of mholt/caddy-l4#217 code that I propose to move here for consistency. It will be used in layer4 module configuration.

- caddytls.MatchLocalIP
- caddytls.MatchRemoteIP
- caddytls.MatchServerName
@vnxme vnxme force-pushed the caddyfile-caddytls-matchers branch from ffd177b to eb6a04d Compare July 24, 2024 12:05
@vnxme
Copy link
Contributor Author

vnxme commented Jul 24, 2024

Rebased it on master. Don't know why linter is failing.

@francislavoie
Copy link
Member

The linter config we have is picky about grouping and ordering of imports. I'll circle back in a bit with a command to fix it

- fix imports order

Co-authored-by: Francis Lavoie <[email protected]>
@vnxme vnxme force-pushed the caddyfile-caddytls-matchers branch from 0c48ee3 to f0817fa Compare July 24, 2024 13:30
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.

Thanks for the great contribution, @vnxme 😃

@mholt mholt merged commit 61fe152 into caddyserver:master Jul 24, 2024
23 checks passed
@vnxme vnxme deleted the caddyfile-caddytls-matchers branch July 25, 2024 07:52
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