diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 21:14:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 21:14:49 +0000 |
commit | 2f230033794fafdf10822568e763d4db68cf6c6b (patch) | |
tree | 39ca5c2325b7b43c9a28ca6d4ad4026a61e7eb97 /dnsdist-protocols.cc | |
parent | Adding debian version 1.8.3-3. (diff) | |
download | dnsdist-2f230033794fafdf10822568e763d4db68cf6c6b.tar.xz dnsdist-2f230033794fafdf10822568e763d4db68cf6c6b.zip |
Merging upstream version 1.9.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | dnsdist-protocols.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/dnsdist-protocols.cc b/dnsdist-protocols.cc index aee63f2..886e7ee 100644 --- a/dnsdist-protocols.cc +++ b/dnsdist-protocols.cc @@ -33,7 +33,9 @@ const std::array<std::string, Protocol::s_numberOfProtocols> Protocol::s_names = "DNSCryptUDP", "DNSCryptTCP", "DoT", - "DoH"}; + "DoH", + "DoQ", + "DoH3"}; const std::array<std::string, Protocol::s_numberOfProtocols> Protocol::s_prettyNames = { "Do53 UDP", @@ -41,7 +43,9 @@ const std::array<std::string, Protocol::s_numberOfProtocols> Protocol::s_prettyN "DNSCrypt UDP", "DNSCrypt TCP", "DNS over TLS", - "DNS over HTTPS"}; + "DNS over HTTPS", + "DNS over QUIC", + "DNS over HTTP/3"}; Protocol::Protocol(const std::string& s) { @@ -79,6 +83,11 @@ bool Protocol::isUDP() const return d_protocol == DoUDP || d_protocol == DNSCryptUDP; } +bool Protocol::isEncrypted() const +{ + return d_protocol != DoUDP && d_protocol != DoTCP; +} + uint8_t Protocol::toNumber() const { return static_cast<uint8_t>(d_protocol); |