Skip to content

Commit

Permalink
fix dns over https
Browse files Browse the repository at this point in the history
  • Loading branch information
LegitCamper committed Sep 15, 2024
1 parent 0f8aa0b commit 9cc90df
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 20 deletions.
35 changes: 21 additions & 14 deletions docker/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,11 @@ volumes:
type: cifs
o: username=${NETWORK_DRIVE_USERNAME},password=${NETWORK_DRIVE_PASSWORD},vers=3.0,rw
device: "//${NETWORK_DRIVE}/homelab/uptimekuma"
certbot:
letsencrypt:
driver_opts:
type: cifs
o: username=${NETWORK_DRIVE_USERNAME},password=${NETWORK_DRIVE_PASSWORD},vers=3.0,rw
device: "//${NETWORK_DRIVE}/homelab/certbot"
certbot-certs:
driver_opts:
type: cifs
o: username=${NETWORK_DRIVE_USERNAME},password=${NETWORK_DRIVE_PASSWORD},vers=3.0,rw
device: "//${NETWORK_DRIVE}/homelab/certbot/certificates"
device: "//${NETWORK_DRIVE}/homelab/letsencrypt"
adgaurd-conf:
driver_opts:
type: cifs
Expand Down Expand Up @@ -173,7 +168,6 @@ services:
- 8920 # https
volumes:
- media:/data/media/:ro
- certbot-certs:/data/certs/:ro
- jellyfin-config:/config
- jellyfin-cache:/cache
environment:
Expand Down Expand Up @@ -266,15 +260,28 @@ services:
volumes:
- adgaurd-conf:/opt/adguardhome/conf:rw
- adguard-work:/opt/adguardhome/work:rw
- certbot:/opt/adguardhome/certs/:rw
- letsencrypt:/opt/adguardhome/certs/:ro
expose:
- 80 # http
- 53 # dns
# these two are terminated by traefik and forwarded over 80 & 53
# and are uneeded
# - 853 # dot
- 80 # webui
- 53 # dns - not used
- 853 # dot
- 443 # doh

lego:
image: goacme/lego
container_name: lego-certbot
restart: always
environment:
- CLOUDFLARE_EMAIL=${CF_API_EMAIL}
- CLOUDFLARE_API_KEY=${CF_API_KEY}
command:
--accept-tos
--email ${CF_API_EMAIL} --dns cloudflare
--domains dns.${DOMAIN} --path /etc/letsencrypt/
run
volumes:
- letsencrypt:/etc/letsencrypt:rw

dashy:
container_name: dashy
image: lissy93/dashy
Expand Down
10 changes: 4 additions & 6 deletions docker/traefik/dynamic.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,23 +152,21 @@ certResolver = "cloudflare"
url = "http://adguardhome:80"

[http.routers.doh]
entryPoints = ["websecure"]
service = "doh"
rule = "Host(`dns.sawyer.services`)"
[http.routers.doh.tls]
certResolver = "cloudflare"

[http.services.doh.loadBalancer]
[[http.services.doh.loadBalancer.servers]]
url = "http://adguard:80" # its already terminated
url = "https://adguardhome:443"

# not terminating tls and instead pass directly to adguard
[tcp.routers.dot]
entryPoints = ["dot"]
service = "dot"
rule = "HostSNI(`dns.sawyer.services`)"
[tcp.routers.dot.tls]
certResolver = "cloudflare"
rule = "HostSNI(`*`)"

[tcp.services.dot.loadBalancer]
[[tcp.services.dot.loadBalancer.servers]]
address = "172.55.0.10:53" # its already terminated
address = "172.55.0.10:853"

0 comments on commit 9cc90df

Please sign in to comment.