-
Notifications
You must be signed in to change notification settings - Fork 178
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
layer4 configuration block #666
Comments
I'm also running into this. Watching to see if this issue gets answered. |
Planning on try the solution here to see if it's a viable workaround. |
Success! I'm attempting to do DNS-over-TLS with pihole, and this is what my labels look like after setting "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 |
@coandco Looks a little bit complex to me comparing to just use the Caddy json config which has more capabilities as well. |
I mean, sure, but if you're using caddy-docker-proxy you don't really have the option of using the json config. |
@coandco indeed; which is sad to be honest. |
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 base
Caddyfile
, but I would like to be able to use layer4 for services defined via labels.The text was updated successfully, but these errors were encountered: