diff --git a/BTCPayServer/Controllers/WalletsController.PSBT.cs b/BTCPayServer/Controllers/WalletsController.PSBT.cs index 3ec39b5cd..0a3410607 100644 --- a/BTCPayServer/Controllers/WalletsController.PSBT.cs +++ b/BTCPayServer/Controllers/WalletsController.PSBT.cs @@ -220,7 +220,7 @@ namespace BTCPayServer.Controllers { Severity = StatusMessageModel.StatusSeverity.Info, AllowDismiss = false, - Message = "This transaction has been coordinated between the receiver and you to create a payjoin transaction 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 payjoin transaction by adding inputs from the receiver. The amount being sent may appear higher but is in fact the same" }); return newPSBT; } diff --git a/BTCPayServer/Hosting/BTCPayServerServices.cs b/BTCPayServer/Hosting/BTCPayServerServices.cs index 041496c63..8c5875980 100644 --- a/BTCPayServer/Hosting/BTCPayServerServices.cs +++ b/BTCPayServer/Hosting/BTCPayServerServices.cs @@ -265,7 +265,7 @@ namespace BTCPayServer.Hosting { 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.PayJoin} rate=5r/min burst= nodelay"); + rateLimits.SetZone($"zone={ZoneLimits.PayJoin} rate=5r/min burst=3 nodelay"); } return rateLimits; }); diff --git a/BTCPayServer/Services/SocketFactory.cs b/BTCPayServer/Services/SocketFactory.cs index 00988d5ae..6bcab0c28 100644 --- a/BTCPayServer/Services/SocketFactory.cs +++ b/BTCPayServer/Services/SocketFactory.cs @@ -9,6 +9,8 @@ using System.Threading.Tasks; using BTCPayServer.Configuration; using com.LandonKey.SocksWebProxy; using com.LandonKey.SocksWebProxy.Proxy; +using Microsoft.Extensions.Logging; +using NBitcoin.Logging; using NBitcoin.Protocol.Connectors; using NBitcoin.Protocol; @@ -73,38 +75,45 @@ namespace BTCPayServer.Services { return Task.Run(() => { - var proxyConfig = new ProxyConfig() {Version = ProxyConfig.SocksVersion.Five}; - switch (_options.SocksEndpoint) + try { - case null: - return null; - case IPEndPoint ipEndPoint: - proxyConfig.SocksPort = ipEndPoint.Port; - proxyConfig.SocksAddress = ipEndPoint.Address; - break; - case DnsEndPoint dnsEndPoint: - try - { + var proxyConfig = new ProxyConfig() {Version = ProxyConfig.SocksVersion.Five}; + switch (_options.SocksEndpoint) + { + case null: + return null; + case IPEndPoint ipEndPoint: + proxyConfig.SocksPort = ipEndPoint.Port; + proxyConfig.SocksAddress = ipEndPoint.Address; + break; + case DnsEndPoint dnsEndPoint: + proxyConfig.SocksPort = dnsEndPoint.Port; var ip = Dns.GetHostEntry(dnsEndPoint.Host).AddressList .SingleOrDefault(address => address.AddressFamily == AddressFamily.InterNetwork); if (ip == null) { + Logs.Utils.LogWarning( $"Could not find ip for {dnsEndPoint.Host}"); return null; } proxyConfig.SocksAddress = ip; break; - } - catch (Exception e) - { - return null; - } - default: - return null; - } - return new HttpClient(new HttpClientHandler {Proxy = new SocksWebProxy(proxyConfig), UseProxy = true}); + default: + return null; + } + Logs.Utils.LogWarning( $"Created socks proxied http client!"); + 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; + } }); } } diff --git a/BTCPayServer/Views/Shared/ViewBitcoinLikePaymentData.cshtml b/BTCPayServer/Views/Shared/ViewBitcoinLikePaymentData.cshtml index 9efdba957..99a484b57 100644 --- a/BTCPayServer/Views/Shared/ViewBitcoinLikePaymentData.cshtml +++ b/BTCPayServer/Views/Shared/ViewBitcoinLikePaymentData.cshtml @@ -52,7 +52,7 @@