Open jameshclrk opened 1 week ago
I'm also running into this. Watching to see if this issue gets answered.
Success! I'm attempting to do DNS-over-TLS with pihole, and this is what my labels look like after setting DOT_INGRESS_ADDR
to 0.0.0.0:853
on my main caddy container:
"caddy_1.layer4.0_{$DOT_INGRESS_ADDR}": ""
"caddy_1.layer4.0_{$DOT_INGRESS_ADDR}.@pihole_host": "tls sni pihole.my.domain"
"caddy_1.layer4.0_{$DOT_INGRESS_ADDR}.route": "@pihole_host"
"caddy_1.layer4.0_{$DOT_INGRESS_ADDR}.route.0_tls": ""
"caddy_1.layer4.0_{$DOT_INGRESS_ADDR}.route.1_proxy": "{{ upstreams 53 }}"
With this approach, I can successfully run doggo google.com A @tls://pihole.my.domain
and get an answer.
Following #342, the layer4 plugin can be configured using
Caddyfile
.I'm trying to get one of the examples working, but I'm not sure how to set the keys in the correct way.
Example
Caddyfile
:I have tried this compose file (ignore using whoami, just an example):
But I get this
Caddyfile
which (correctly) causes an error:I've tried escaping the
.
s with\
and that also doesn't work. This simple example could be done in a baseCaddyfile
, but I would like to be able to use layer4 for services defined via labels.