DNS settings for a name server.
More...
#include <dns_options.hpp>
|
| std::vector< DnsAddress > | addresses |
| | Parsed from –dns server n address ADDRESS[:PORT] [...] or –dhcp-option DNS/DNS6.
|
| |
| std::vector< DnsDomain > | domains |
| | Parsed from –dns server n resolve-domains DOMAIN [...] or –dhcp-option DOMAIN/DOMAIN-SEARCH if use_search_as_split_domains is true.
|
| |
| Security | dnssec = Security::Unset |
| | Parsed from –dns server n dnssec {yes,optional,no}.
|
| |
| Transport | transport = Transport::Unset |
| | Parsed from –dns server n transport {plain,DoT,DoH}.
|
| |
| std::string | sni |
| | Parsed from –dns server n sni.
|
| |
DNS settings for a name server.
Definition at line 215 of file dns_options.hpp.
◆ Security
| Enumerator |
|---|
| Unset | Undefined setting; default value when not set.
|
| No | Do not use DNSSEC.
|
| Yes | Enforce using DNSSEC.
|
| Optional | Try to use DNSSEC opportunistically. If it fails, the DNS resolver may ignore DNSSEC.
|
Definition at line 217 of file dns_options.hpp.
◆ Transport
| Enumerator |
|---|
| Unset | Undefined setting; default value when not set.
|
| Plain | Use the classic unencrypted DNS protocol.
|
| HTTPS | Use DNS-over-HTTPS (DoH)
|
| TLS | Use DNS-over-TLS (DoT)
|
Definition at line 288 of file dns_options.hpp.
◆ DnsServer() [1/2]
| openvpn::DnsServer::DnsServer |
( |
| ) |
|
|
default |
◆ ~DnsServer()
| virtual openvpn::DnsServer::~DnsServer |
( |
| ) |
|
|
virtualdefaultnoexcept |
◆ DnsServer() [2/2]
| openvpn::DnsServer::DnsServer |
( |
const Json::Value & |
root, |
|
|
const std::string & |
title = "" |
|
) |
| |
|
inlineexplicit |
Instantiate a new DnsServer object with information from a JSON blob, typically exported using the DnsServer::to_json() method
- Parameters
-
| root | The root Json::Value object to import |
| title | std::string with details used for error logging |
Definition at line 368 of file dns_options.hpp.
◆ dnssec_string() [1/2]
| std::string openvpn::DnsServer::dnssec_string |
( |
| ) |
const |
|
inline |
Return string representation of the dnssec value in this DnsServer object.
- Returns
- std::string the string representation generated
Definition at line 254 of file dns_options.hpp.
◆ dnssec_string() [2/2]
| static std::string openvpn::DnsServer::dnssec_string |
( |
const Security |
dnssec | ) |
|
|
inlinestatic |
◆ from_json()
| void openvpn::DnsServer::from_json |
( |
const Json::Value & |
root, |
|
|
const std::string & |
title |
|
) |
| |
|
inline |
Import a Json::Value, typically generated by DnsServer::to_json() which will reconfigure this object to carry the information from the JSON data.
- Parameters
-
| root | The root Json::Value object to import |
| title | std::string with details used for error logging |
Definition at line 454 of file dns_options.hpp.
◆ operator==()
| bool openvpn::DnsServer::operator== |
( |
const DnsServer & |
at | ) |
const |
|
default |
◆ parse_dnssec_value()
| void openvpn::DnsServer::parse_dnssec_value |
( |
const std::string & |
dnssec_value | ) |
|
|
inline |
Parse the –dns server n dnssec VALUE into the internal DnsServer::Security representation. This method is typically called from the option parser.
- Parameters
-
| dnssec_value | std::string containing the DNSSEC setting to use |
- Exceptions
-
Definition at line 268 of file dns_options.hpp.
◆ parse_transport_value()
| void openvpn::DnsServer::parse_transport_value |
( |
const std::string & |
transport_value | ) |
|
|
inline |
Parse the –dns server n transport VALUE into the internal DnsServer::Transport representation. This method is typically called from the option parser.
- Parameters
-
| transport_value | std::string containing the DNS transport setting to use |
- Exceptions
-
Definition at line 337 of file dns_options.hpp.
◆ to_json()
| Json::Value openvpn::DnsServer::to_json |
( |
| ) |
const |
|
inline |
Generate a JSON representation of the configured DnsServer variables.
The output of this function can be imported into another DnsServer object by passing the Json::Value to the DnsServer constructor or using the DnsServer::from_json() method.
- Returns
- Json::Value of information this object carries
Definition at line 423 of file dns_options.hpp.
◆ to_string()
| std::string openvpn::DnsServer::to_string |
( |
const char * |
prefix = "" | ) |
const |
|
inline |
Generate a human readable representation of the configured DnsServer variables
- Returns
- std::string the string representation generated
Definition at line 380 of file dns_options.hpp.
◆ transport_string() [1/2]
| std::string openvpn::DnsServer::transport_string |
( |
| ) |
const |
|
inline |
◆ transport_string() [2/2]
| static std::string openvpn::DnsServer::transport_string |
( |
const Transport |
transport | ) |
|
|
inlinestatic |
◆ addresses
| std::vector<DnsAddress> openvpn::DnsServer::addresses |
Parsed from –dns server n address ADDRESS[:PORT] [...] or –dhcp-option DNS/DNS6.
Definition at line 511 of file dns_options.hpp.
◆ dnssec
Parsed from –dns server n dnssec {yes,optional,no}.
Definition at line 517 of file dns_options.hpp.
◆ domains
| std::vector<DnsDomain> openvpn::DnsServer::domains |
Parsed from –dns server n resolve-domains DOMAIN [...] or –dhcp-option DOMAIN/DOMAIN-SEARCH if use_search_as_split_domains is true.
Definition at line 514 of file dns_options.hpp.
◆ sni
| std::string openvpn::DnsServer::sni |
◆ transport
Parsed from –dns server n transport {plain,DoT,DoH}.
Definition at line 520 of file dns_options.hpp.
The documentation for this class was generated from the following file: