feat(caddy): add tls internal vhosts for upstream mirror hosts
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
|
# auto_https off would disable TLS entirely, breaking `tls internal` for the
|
||||||
|
# air-gap mirror vhosts. disable_redirects keeps the apex/auth/packwiz sites
|
||||||
|
# plaintext on :80 (they use explicit http://) while still allowing internal
|
||||||
|
# TLS on the mirror hosts below.
|
||||||
{
|
{
|
||||||
auto_https off
|
auto_https disable_redirects
|
||||||
}
|
}
|
||||||
|
|
||||||
http://{$BASE_DOMAIN} {
|
http://{$BASE_DOMAIN} {
|
||||||
@@ -15,3 +19,13 @@ http://packwiz.{$BASE_DOMAIN} {
|
|||||||
root * /srv/pack
|
root * /srv/pack
|
||||||
file_server browse
|
file_server browse
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Full client air-gap mirror (see plan/11-full-airgap-mirror.md): byte-exact
|
||||||
|
# copies of the real upstream hosts served over HTTPS with Caddy's local CA.
|
||||||
|
# dnsmasq spoofs these hostnames -> our host; the {host} placeholder roots each
|
||||||
|
# hostname at its own mirror subtree. Guests import the Caddy root CA once.
|
||||||
|
meta.prismlauncher.org, piston-meta.mojang.com, piston-data.mojang.com, libraries.minecraft.net, maven.neoforged.net, resources.download.minecraft.net {
|
||||||
|
tls internal
|
||||||
|
root * /srv/mirror/{host}
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
# - "443:443" # future TLS (step-ca), deferred
|
- "443:443" # tls internal — air-gap mirror vhosts (see 11)
|
||||||
environment:
|
environment:
|
||||||
BASE_DOMAIN: ${BASE_DOMAIN}
|
BASE_DOMAIN: ${BASE_DOMAIN}
|
||||||
volumes:
|
volumes:
|
||||||
@@ -43,11 +43,19 @@ services:
|
|||||||
- ./www:/srv/www:ro
|
- ./www:/srv/www:ro
|
||||||
- ./pack:/srv/pack:ro
|
- ./pack:/srv/pack:ro
|
||||||
- ./mirror/launcher:/srv/www/launcher:ro
|
- ./mirror/launcher:/srv/www/launcher:ro
|
||||||
|
- ./mirror/upstream:/srv/mirror:ro # byte-exact upstream mirror (see 11)
|
||||||
networks:
|
networks:
|
||||||
mcnet:
|
mcnet:
|
||||||
aliases:
|
aliases:
|
||||||
- "auth.${BASE_DOMAIN}"
|
- "auth.${BASE_DOMAIN}"
|
||||||
- "packwiz.${BASE_DOMAIN}"
|
- "packwiz.${BASE_DOMAIN}"
|
||||||
|
# Air-gap spoof hosts -> Caddy, so internal containers resolve them too.
|
||||||
|
- "meta.prismlauncher.org"
|
||||||
|
- "piston-meta.mojang.com"
|
||||||
|
- "piston-data.mojang.com"
|
||||||
|
- "libraries.minecraft.net"
|
||||||
|
- "maven.neoforged.net"
|
||||||
|
- "resources.download.minecraft.net"
|
||||||
|
|
||||||
drasl:
|
drasl:
|
||||||
image: unmojang/drasl:latest
|
image: unmojang/drasl:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user