Add per-host certificate type and DNS challenge support to App Gateway

Each application host now selects how its TLS certificate is issued:
self-signed, ACME HTTP challenge, or ACME DNS challenge using a stored
DNS credential. ACME modes fall back to the internal CA when issuance
fails, so hosts stay reachable with a browser warning instead of a TLS
error.

- Add DnsChallengeCredential model and provider registry (Cloudflare)
- Add certificate_type and dns_credential to ApplicationHost
- Sync WireGuard WebAdmin hosts from .env into the reserved application
- Export per-host TLS settings to tls.json, read only by Caddy
- Group hosts by certificate settings into separate Caddy site blocks
- Build Caddy with the Cloudflare DNS module using xcaddy
- Regenerate the Caddyfile without DNS challenge if validation fails
This commit is contained in:
Eduardo Silva
2026-11-17 15:59:40 -03:00
parent 433761e365
commit c5f215d9df
15 changed files with 624 additions and 35 deletions
+4
View File
@@ -28,6 +28,10 @@ urlpatterns = [
path('route/manage/', views.view_manage_application_route, name='manage_application_route'),
path('route/delete/', views.view_delete_application_route, name='delete_application_route'),
# DNS Challenge Credentials
path('dns_credential/manage/', views.view_manage_dns_credential, name='manage_dns_credential'),
path('dns_credential/delete/', views.view_delete_dns_credential, name='delete_dns_credential'),
# Config Export
path('export/caddy/', views.view_export_caddy_config, name='export_caddy_config'),
]