mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
Show onion hosts instead of url (can't know about ports)
This commit is contained in:
parent
4769b1d452
commit
4f582a6712
@ -29,8 +29,11 @@ namespace BTCPayServer.Services
|
||||
{
|
||||
try
|
||||
{
|
||||
var onionUrl = (await service.ReadingLines)[0].Trim();
|
||||
result.Add(new TorService() { Name = service.ServiceName, OnionUrl = onionUrl });
|
||||
var onionHost = (await service.ReadingLines)[0].Trim();
|
||||
var torService = new TorService() { Name = service.ServiceName, OnionHost = onionHost };
|
||||
if (service.ServiceName.Equals("BTCPayServer", StringComparison.OrdinalIgnoreCase))
|
||||
torService.ServiceType = TorServiceType.BTCPayServer;
|
||||
result.Add(torService);
|
||||
}
|
||||
catch
|
||||
{
|
||||
@ -43,7 +46,14 @@ namespace BTCPayServer.Services
|
||||
|
||||
public class TorService
|
||||
{
|
||||
public TorServiceType ServiceType { get; set; } = TorServiceType.Other;
|
||||
public string Name { get; set; }
|
||||
public string OnionUrl { get; set; }
|
||||
public string OnionHost { get; set; }
|
||||
}
|
||||
|
||||
public enum TorServiceType
|
||||
{
|
||||
BTCPayServer,
|
||||
Other
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@
|
||||
<div class="col-md-8">
|
||||
<h4>TOR hidden services</h4>
|
||||
<div class="form-group">
|
||||
<span>TOR services hosted on this server</span>
|
||||
<span>TOR services hosted on this server, services using auto service registration (like lightning services) will not appear here.</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<table class="table table-sm table-responsive-md">
|
||||
@ -100,9 +100,7 @@
|
||||
{
|
||||
<tr>
|
||||
<td>@s.Name</td>
|
||||
<td style="text-align:right">
|
||||
<a href="@s.OnionUrl" target="_blank">See information</a>
|
||||
</td>
|
||||
<td style="text-align:right">@s.OnionHost</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
Loading…
Reference in New Issue
Block a user