Hi everyone,
I’ve been experimenting with the Caddy Layer 4 module because I see a lot of potential in it. I have a question about its capabilities and whether something specific is possible.
I want to expose two services over port 443 with TLS with a domain name: one HTTP server and one TURN server. I noticed that Layer 4 can be configured using the layer4.matchers.regexp
.
Is it possible to use this matcher to multiplex traffic to both servers over port 443 with TLS?
I was considering the following approach:
- Identify TURN bytes in TCP traffic with
layer4.matchers.regexp
- If a regex match is found, forward the traffic to the TURN server.
- If no match is found, fall back to the HTTP server.
I’m curious if this setup is feasible or if my assumptions are incorrect.
Best regards.