AngleSharp by Florian Rappl

<PackageReference Include="AngleSharp" Version="0.8.4.1" />

 PortNumbers

static class PortNumbers
Contains a collection of default ports.
using System.Collections.Generic; namespace AngleSharp.Network { internal static class PortNumbers { private static readonly Dictionary<string, string> ports = new Dictionary<string, string> { { KnownProtocols.Http, "80" }, { KnownProtocols.Https, "443" }, { KnownProtocols.Ftp, "21" }, { KnownProtocols.File, "" }, { KnownProtocols.Ws, "80" }, { KnownProtocols.Wss, "443" }, { KnownProtocols.Gopher, "70" }, { KnownProtocols.Telnet, "23" }, { KnownProtocols.Ssh, "22" } }; public static string GetDefaultPort(string protocol) { string value = string.Empty; if (ports.TryGetValue(protocol, out value)) return value; return null; } } }