Enable `bitcoin-p2p` and `tcp`
MODIFY
WalletWasabi.Tests/ParserTests.cs
WalletWasabi.Tests/ParserTests.cs
@@ -21,6 +21,10 @@ namespace WalletWasabi.Tests
{
host,
$"{host} ",
+ $"bitcoin-p2p://{host}",
+ $"Bitcoin-P2P://{host}",
+ $"tcp://{host}",
+ $"TCP://{host}",
$" {host}",
$" {host} ",
$"{host}:",
@@ -36,6 +40,10 @@ namespace WalletWasabi.Tests
var inputsWithtPorts = new[]
{
$"{host}:5000",
+ $"bitcoin-p2p://{host}:5000",
+ $"BITCOIN-P2P://{host}:5000",
+ $"tcp://{host}:5000",
+ $"TCP://{host}:5000",
$" {host}:5000",
$"{host} :5000",
$" {host}:5000",

MODIFY
WalletWasabi/Helpers/EndPointParser.cs
WalletWasabi/Helpers/EndPointParser.cs
@@ -51,6 +51,9 @@ namespace System.Net
endPointString = Guard.Correct(endPointString);
endPointString = endPointString.TrimEnd(':', '/');
+ endPointString = endPointString.TrimStart("bitcoin-p2p://", StringComparison.OrdinalIgnoreCase);
+ endPointString = endPointString.TrimStart("tcp://", StringComparison.OrdinalIgnoreCase);
+
var parts = endPointString.Split(':', StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim().TrimEnd('/').TrimEnd()).ToArray();
var isDefaultPortInvalid = !ushort.TryParse(defaultPort.ToString(), out ushort dp) || dp < IPEndPoint.MinPort || dp > IPEndPoint.MaxPort;

Enable `bitcoin-p2p` and `tcp`