mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
fixes
This commit is contained in:
@@ -220,7 +220,7 @@ namespace BTCPayServer.Controllers
|
|||||||
{
|
{
|
||||||
Severity = StatusMessageModel.StatusSeverity.Info,
|
Severity = StatusMessageModel.StatusSeverity.Info,
|
||||||
AllowDismiss = false,
|
AllowDismiss = false,
|
||||||
Message = "This transaction has been coordinated between the receiver and you to create a <a href='https://en.bitcoin.it/wiki/PayJoin' target='_blank'>payjoin transaction</a> by adding inputs from the receiver. The amount being sent may appear higher but is in fact the same"
|
Html = "This transaction has been coordinated between the receiver and you to create a <a href='https://en.bitcoin.it/wiki/PayJoin' target='_blank'>payjoin transaction</a> by adding inputs from the receiver. The amount being sent may appear higher but is in fact the same"
|
||||||
});
|
});
|
||||||
return newPSBT;
|
return newPSBT;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ namespace BTCPayServer.Hosting
|
|||||||
{
|
{
|
||||||
rateLimits.SetZone($"zone={ZoneLimits.Login} rate=5r/min burst=3 nodelay");
|
rateLimits.SetZone($"zone={ZoneLimits.Login} rate=5r/min burst=3 nodelay");
|
||||||
rateLimits.SetZone($"zone={ZoneLimits.Register} rate=2r/min burst=2 nodelay");
|
rateLimits.SetZone($"zone={ZoneLimits.Register} rate=2r/min burst=2 nodelay");
|
||||||
rateLimits.SetZone($"zone={ZoneLimits.PayJoin} rate=5r/min burst= nodelay");
|
rateLimits.SetZone($"zone={ZoneLimits.PayJoin} rate=5r/min burst=3 nodelay");
|
||||||
}
|
}
|
||||||
return rateLimits;
|
return rateLimits;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ using System.Threading.Tasks;
|
|||||||
using BTCPayServer.Configuration;
|
using BTCPayServer.Configuration;
|
||||||
using com.LandonKey.SocksWebProxy;
|
using com.LandonKey.SocksWebProxy;
|
||||||
using com.LandonKey.SocksWebProxy.Proxy;
|
using com.LandonKey.SocksWebProxy.Proxy;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using NBitcoin.Logging;
|
||||||
using NBitcoin.Protocol.Connectors;
|
using NBitcoin.Protocol.Connectors;
|
||||||
using NBitcoin.Protocol;
|
using NBitcoin.Protocol;
|
||||||
|
|
||||||
@@ -72,6 +74,8 @@ namespace BTCPayServer.Services
|
|||||||
private Task<HttpClient> CreateHttpClientUsingSocks()
|
private Task<HttpClient> CreateHttpClientUsingSocks()
|
||||||
{
|
{
|
||||||
return Task.Run(() =>
|
return Task.Run(() =>
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var proxyConfig = new ProxyConfig() {Version = ProxyConfig.SocksVersion.Five};
|
var proxyConfig = new ProxyConfig() {Version = ProxyConfig.SocksVersion.Five};
|
||||||
switch (_options.SocksEndpoint)
|
switch (_options.SocksEndpoint)
|
||||||
@@ -83,28 +87,33 @@ namespace BTCPayServer.Services
|
|||||||
proxyConfig.SocksAddress = ipEndPoint.Address;
|
proxyConfig.SocksAddress = ipEndPoint.Address;
|
||||||
break;
|
break;
|
||||||
case DnsEndPoint dnsEndPoint:
|
case DnsEndPoint dnsEndPoint:
|
||||||
try
|
|
||||||
{
|
|
||||||
proxyConfig.SocksPort = dnsEndPoint.Port;
|
proxyConfig.SocksPort = dnsEndPoint.Port;
|
||||||
var ip = Dns.GetHostEntry(dnsEndPoint.Host).AddressList
|
var ip = Dns.GetHostEntry(dnsEndPoint.Host).AddressList
|
||||||
.SingleOrDefault(address => address.AddressFamily == AddressFamily.InterNetwork);
|
.SingleOrDefault(address => address.AddressFamily == AddressFamily.InterNetwork);
|
||||||
if (ip == null)
|
if (ip == null)
|
||||||
{
|
{
|
||||||
|
Logs.Utils.LogWarning( $"Could not find ip for {dnsEndPoint.Host}");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
proxyConfig.SocksAddress = ip;
|
proxyConfig.SocksAddress = ip;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Logs.Utils.LogWarning( $"Created socks proxied http client!");
|
||||||
return new HttpClient(new HttpClientHandler {Proxy = new SocksWebProxy(proxyConfig), UseProxy = true});
|
return new HttpClient(new HttpClientHandler
|
||||||
|
{
|
||||||
|
Proxy = new SocksWebProxy(proxyConfig), UseProxy = true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Logs.Utils.LogError(e, "Could not create Tor client");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<tr class="@(payment.Replaced ? "linethrough" : "")" >
|
<tr class="@(payment.Replaced ? "linethrough" : "")" >
|
||||||
<td>@payment.Crypto</td>
|
<td>@payment.Crypto</td>
|
||||||
<td>@payment.DepositAddress</td>
|
<td>@payment.DepositAddress</td>
|
||||||
<td>@payment.CryptoPaymentData.GetValue() @(payment.CryptoPaymentData.PayJoinSelfContributedAmount == 0? string.Empty : $"(+ Payjoin {payment.CryptoPaymentData.PayJoinSelfContributedAmount })")</td>
|
<td>@payment.CryptoPaymentData.GetValue() @(payment.CryptoPaymentData.PayJoinSelfContributedAmount == 0? string.Empty : $"<br/>(+ Payjoin {payment.CryptoPaymentData.PayJoinSelfContributedAmount })")</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="wraptextAuto">
|
<div class="wraptextAuto">
|
||||||
<a href="@payment.TransactionLink" target="_blank">
|
<a href="@payment.TransactionLink" target="_blank">
|
||||||
|
|||||||
Reference in New Issue
Block a user