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,53 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class='row'>
|
||||
<div class='col-lg-6'>
|
||||
<div class="card card-primary card-outline">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">{{ page_title }}</h3>
|
||||
</div>
|
||||
<div class="card-body row">
|
||||
<div class="col-lg-12">
|
||||
{% crispy form %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='col-lg-6'>
|
||||
<div class="card card-primary card-outline">
|
||||
<div class="card-body row">
|
||||
<div class="col-lg-12">
|
||||
<h5>{% trans 'DNS Credential' %}</h5>
|
||||
<p>{% trans 'Credentials used to create the DNS records required by the ACME DNS challenge.' %}</p>
|
||||
<p>{% blocktrans trimmed %}
|
||||
Use a token restricted to editing DNS records of the zones you need. For Cloudflare, create an
|
||||
API Token with the <strong>Zone / DNS / Edit</strong> permission.
|
||||
{% endblocktrans %}</p>
|
||||
<p>{% trans 'Secret values are never displayed after saving. Leave them blank when editing to keep the current value.' %}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block custom_page_scripts %}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
function toggleProviderFields() {
|
||||
var provider = $('#id_provider').val();
|
||||
$('.provider-group').hide();
|
||||
if (provider) {
|
||||
$('.provider-' + provider).show();
|
||||
}
|
||||
}
|
||||
|
||||
$('#id_provider').change(toggleProviderFields);
|
||||
toggleProviderFields();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user