I have been using caddy and now trying to integrate it together with traefik.
I have successfully reversed proxied the real domains, but now I wanted to passthrough the internal lan domains, domains like *.home.lan, they are using the caddy self signed certificates so I have added these labels to my caddy docker instance:
then Traefik needs access to the TLS cert to read the domain from the request. If no cert is available, Traefik will generate a custom one. And that custom encrypted traffic is then forwarded to caddy which does not know the cert.
To forward traffic in Traefik without a TLS cert, you can only use HostSNI(`*`).
Thinking about it, this will not work, as TCP routers are processed before http routers, so all requests will match this first and will be forwarded to caddy.
So you would need to use a different port or provide the caddy cert to Traefik.
Dirty hack regarding the port: create a html service for Traefik with the target domain that just redirects to the different port. That way you can access it without adding the port in URL, browser will be redirected. You will see it in the URL then, but you never have to type it.