mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-11-21 04:23:15 +01:00
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:
@@ -0,0 +1,22 @@
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
# Every provider listed here must also be compiled into the Caddy image
|
||||
# (see containers/caddy/Dockerfile-caddy). Field names must match the
|
||||
# subdirectives accepted by the provider's Caddy DNS module, and the optional
|
||||
# pattern should mirror the module's own validation, since an invalid value
|
||||
# prevents Caddy from loading the configuration.
|
||||
DNS_PROVIDERS = {
|
||||
'cloudflare': {
|
||||
'label': 'Cloudflare',
|
||||
'fields': [
|
||||
{
|
||||
'name': 'api_token',
|
||||
'label': _('API Token'),
|
||||
'secret': True,
|
||||
'pattern': r'^(cf(ut|at)_[A-Za-z0-9_-]{32,256}|[A-Za-z0-9_-]{35,50})$',
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
DNS_PROVIDER_CHOICES = [(provider, provider_data['label']) for provider, provider_data in DNS_PROVIDERS.items()]
|
||||
Reference in New Issue
Block a user