Skip to content

Commit

Permalink
Match DoT TLS-ALPN
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorm committed Mar 3, 2022
1 parent 1a85734 commit a5dbad3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions examples/caddy-grafana/config/caddy/Caddyfile.cue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ logging: logs: {

apps: {
http: servers: {
main_http: {
http: {
listen: [":80"]
routes: [{
match: [{ host: ["{$TLS_DOMAIN}"] }]
Expand All @@ -31,7 +31,7 @@ apps: {
automatic_https: disable: true
logs: default_logger_name: "main"
}
main_https: {
https: {
listen: [":443"]
routes: [{
match: [{ host: ["{$TLS_DOMAIN}"] }]
Expand Down Expand Up @@ -82,14 +82,15 @@ apps: {
}
}
layer4: servers: {
main_dot: {
dot: {
listen: [":853"]
routes: [{
// DNS-over-TLS endpoint
match: [{ tls: { } }]
handle: [{
handler: "tls"
connection_policies: [{
alpn: ["dot"]
match: sni: ["{$TLS_DOMAIN}", ""]
default_sni: "{$TLS_DOMAIN}"
}]
Expand Down
7 changes: 4 additions & 3 deletions examples/caddy/config/caddy/Caddyfile.cue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ logging: logs: {

apps: {
http: servers: {
main_http: {
http: {
listen: [":80"]
routes: [{
match: [{ host: ["{$TLS_DOMAIN}"] }]
Expand All @@ -31,7 +31,7 @@ apps: {
automatic_https: disable: true
logs: default_logger_name: "main"
}
main_https: {
https: {
listen: [":443"]
routes: [{
match: [{ host: ["{$TLS_DOMAIN}"] }]
Expand Down Expand Up @@ -72,14 +72,15 @@ apps: {
}
}
layer4: servers: {
main_dot: {
dot: {
listen: [":853"]
routes: [{
// DNS-over-TLS endpoint
match: [{ tls: { } }]
handle: [{
handler: "tls"
connection_policies: [{
alpn: ["dot"]
match: sni: ["{$TLS_DOMAIN}", ""]
default_sni: "{$TLS_DOMAIN}"
}]
Expand Down

0 comments on commit a5dbad3

Please sign in to comment.