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