Hi there,
1. My Caddy version (caddy version
):
latest v2
branch
2. How I run Caddy:
Use go run
command from source
System environment:
MacOS
3. The problem I’m having:
I’d like to register a ListenerMiddleware after tls.Listener
.
In v1
I could register my listener middleware, it works well in PlainHTTP.
https://github.com/caddyserver/caddy/blob/master/caddyhttp/httpserver/siteconfig.go#L114-L116
But what I wanted is that it should work in Secure HTTP. I can’t reach that because my listener will be wrapped in tls.Listener
.
https://github.com/caddyserver/caddy/blob/master/caddyhttp/httpserver/server.go#L311-L340
What I can see in v2
is that I can implement a http.Handler
module but it is not a listener I was looking for.
4. Why I need this feature
I’ve a specified protocol if it matches that, I want to handle this connection by my own. If not it will be considered as a HTTP request.
Thanks a lot