mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Show other tor services
This commit is contained in:
@@ -470,12 +470,20 @@ namespace BTCPayServer.Controllers
|
||||
{
|
||||
if (torService.VirtualPort == 80)
|
||||
{
|
||||
result.TorServices.Add(new ServicesViewModel.OtherExternalService()
|
||||
result.TorHttpServices.Add(new ServicesViewModel.OtherExternalService()
|
||||
{
|
||||
Name = torService.Name,
|
||||
Link = $"http://{torService.OnionHost}"
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
result.OtherExternalServices.Add(new ServicesViewModel.OtherExternalService()
|
||||
{
|
||||
Name = torService.Name,
|
||||
Link = $"{torService.OnionHost}:{torService.VirtualPort}"
|
||||
});
|
||||
}
|
||||
}
|
||||
return View(result);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace BTCPayServer.Models.ServerViewModels
|
||||
|
||||
public List<ExternalService> ExternalServices { get; set; } = new List<ExternalService>();
|
||||
public List<OtherExternalService> OtherExternalServices { get; set; } = new List<OtherExternalService>();
|
||||
public List<OtherExternalService> TorServices { get; set; } = new List<OtherExternalService>();
|
||||
public List<OtherExternalService> TorHttpServices { get; set; } = new List<OtherExternalService>();
|
||||
public List<OtherExternalService> TorOtherServices { get; set; } = new List<OtherExternalService>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,11 +79,11 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.TorServices.Count != 0)
|
||||
@if (Model.TorHttpServices.Count != 0)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<h4>TOR hidden services</h4>
|
||||
<h4>HTTP TOR hidden services</h4>
|
||||
<div class="form-group">
|
||||
<span>TOR services hosted on this server, only http servers are listed here.</span>
|
||||
</div>
|
||||
@@ -96,7 +96,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var s in Model.TorServices)
|
||||
@foreach (var s in Model.TorHttpServices)
|
||||
{
|
||||
<tr>
|
||||
<td>@s.Name</td>
|
||||
@@ -112,6 +112,37 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.TorOtherServices.Count != 0)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<h4>Other TOR hidden services</h4>
|
||||
<div class="form-group">
|
||||
<span>TOR services hosted on this server which are not http based.</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<table class="table table-sm table-responsive-md">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th style="text-align:right">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var s in Model.TorOtherServices)
|
||||
{
|
||||
<tr>
|
||||
<td>@s.Name</td>
|
||||
<td style="text-align:right">@s.Link</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
@await Html.PartialAsync("_ValidationScriptsPartial")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user