Class DnsPorts
- Namespace
- VpnHood.Core.Filtering.Abstractions
- Assembly
- VpnHood.Core.Filtering.Abstractions.dll
Provides the destination ports that tell DNS flows to a filter, which sees only a flow's protocol and destination.
public static class DnsPorts
- Inheritance
-
DnsPorts
- Inherited Members
Remarks
DNS over HTTPS has no port of its own: on port 443, no port test can tell it from any other HTTPS flow.
Fields
Dns
The port of plain DNS, over UDP and TCP: 53.
public const int Dns = 53
Field Value
DnsOverTls
The port of DNS over TLS, on TCP, and of DNS over QUIC, on UDP: 853.
public const int DnsOverTls = 853
Field Value
Methods
IsDnsPort(int)
Determines whether a port is one of DNS's, over UDP or TCP.
public static bool IsDnsPort(int port)
Parameters
portintThe destination port.
Returns
IsSecureDns(IpProtocol, int)
Determines whether a flow is secure DNS: DNS over TLS, on TCP port 853, or DNS over QUIC (RFC 9250), on UDP port 853.
public static bool IsSecureDns(IpProtocol protocol, int port)
Parameters
protocolIpProtocolThe flow's protocol.
portintThe destination port.