feat: Update Caddyfile rules and add new subdomain proxies

- Update `User-Agent` matching rule in the Docker registry to use regex for expanded compatibility (e.g., "buildkit" and "containerd").
- Add subdomain `pass.local.msws.xyz` with reverse proxy to the `vaultwarden` service.
- Introduce subdomain `code.local.msws.xyz` for proxying requests to the `code-server` instance.
- Swap ordering of ports `:80` and `:443` for improved consistency.
- Add `/tetris` path handler to proxy requests to `/font-tetris` on `msws.github.io`.
This commit is contained in:
MSWS
2025-07-09 01:47:35 -07:00
parent 6e8368ea0a
commit c5763ed0f5

View File

@@ -20,7 +20,7 @@
registry.msws.xyz {
@docker {
path_regexp ^.*/[^/]+(:[^/]+)?(/.*)?$
header User-Agent *docker/*
header_regexp User-Agent .*(buildkit|docker|containerd).*
}
handle @docker {
@@ -32,6 +32,10 @@ registry.msws.xyz {
}
}
pass.local.msws.xyz {
reverse_proxy vaultwarden:80
}
git.msws.xyz {
reverse_proxy gitea-server-1:3000
}
@@ -44,6 +48,10 @@ yt.local.msws.xyz, yt.msws.xyz {
# auto_https disable_redirects
#}
code.local.msws.xyz {
reverse_proxy code-server:8443
}
music.local.msws.xyz, music.msws.xyz {
reverse_proxy navidrome:4533
}
@@ -62,7 +70,8 @@ photos.local.msws.xyz, photos.msws.xyz {
}
}
:443, :80 {
:80, :443 {
handle_path /resume* {
rewrite * /MSWS/Resume/main/Resume.pdf
reverse_proxy https://raw.githubusercontent.com {
@@ -71,6 +80,13 @@ photos.local.msws.xyz, photos.msws.xyz {
}
}
handle_path /tetris {
rewrite * /font-tetris
reverse_proxy https://msws.github.io {
header_up Host msws.github.io
}
}
handle_path /s/* {
rewrite /s/ /
reverse_proxy chhoto-url:4567
@@ -79,5 +95,4 @@ photos.local.msws.xyz, photos.msws.xyz {
reverse_proxy https://msws.github.io {
header_up Host msws.github.io
}
# redir / https://msws.github.io{uri}
}