-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
DynamicDnsServices.cshtml
81 lines (76 loc) · 3.69 KB
/
DynamicDnsServices.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@using BTCPayServer.Abstractions.Models
@model BTCPayServer.Models.ServerViewModels.DynamicDnsViewModel[]
@{
ViewData.SetActivePage(ServerNavPages.Services, "Dynamic DNS Settings");
}
<div class="row">
<div class="col-md-8">
<div class="d-sm-flex align-items-center justify-content-between mb-3">
<h3 class="mb-0">
@ViewData["Title"]
<small>
<a href="https://docs.btcpayserver.org/Apps/" target="_blank" rel="noreferrer noopener" title="More information...">
<vc:icon symbol="info" />
</a>
</small>
</h3>
<form method="post" asp-action="DynamicDnsService">
<button id="AddDynamicDNS" class="btn btn-primary mt-2" type="submit"><span class="fa fa-plus"></span> Add service</button>
</form>
</div>
<div class="form-group">
<p>
Dynamic DNS allows you to have a stable DNS name pointing to your server, even if your IP address changes regulary.
This is recommended if you are hosting BTCPay Server at home and wish to have a clearnet domain to access your server.
</p>
<p>
Note that you need to properly configure your NAT and BTCPay Server installation to get the HTTPS certificate.
See the documentation for <a href="https://docs.btcpayserver.org/Deployment/DynamicDNS/" target="_blank" rel="noreferrer noopener">more information</a>.
</p>
</div>
@if (Model.Any())
{
<table class="table table-sm table-responsive-md">
<thead>
<tr>
<th>Hostname</th>
<th>Last updated</th>
<th class="text-center">Enabled</th>
<th class="text-end">Actions</th>
</tr>
</thead>
<tbody>
@foreach (var service in Model)
{
<tr>
<td>@service.Settings.Hostname</td>
<td>@service.LastUpdated</td>
<td class="text-center">
@if (service.Settings.Enabled)
{
<span class="text-success fa fa-check"></span>
}
else
{
<span class="text-danger fa fa-times"></span>
}
</td>
<td class="text-end">
<a asp-action="DynamicDnsService" asp-route-hostname="@service.Settings.Hostname">Edit</a>
<span> - </span>
<a asp-action="DeleteDynamicDnsService" asp-route-hostname="@service.Settings.Hostname" data-bs-toggle="modal" data-bs-target="#ConfirmModal" data-description="Deleting the dynamic DNS service for <strong>@Html.Encode(service.Settings.Hostname)</strong> means your BTCPay Server will stop updating the associated DNS record periodically." data-confirm-input="DELETE">Delete</a>
</td>
</tr>
}
</tbody>
</table>
}
else
{
<p class="text-secondary mt-3">
There are no dynamic DNS services yet.
</p>
}
</div>
</div>
<partial name="_Confirm" model="@(new ConfirmModel("Delete dynamic DNS service", "Deleting the dynamic DNS service means your BTCPay Server will stop updating the associated DNS record periodically.", "Delete"))" />