Skip to main content

Module dns_parser

Module dns_parser 

Source
Expand description

Shared DNS parsing logic for zone files.

Structs§

DnsRecord
A parsed DNS resource record.

Statics§

PROXIED
Matches an inline cf-proxied comment annotation.
SOA
Matches the SOA record line to extract the zone name.
TXT
Extracts quoted strings from TXT record data.
ZONE
Matches a standard DNS resource record line.

Functions§

can_proxy
Returns whether a record type supports Cloudflare proxying.
parse_srv_name
Parses an SRV record name into (remaining record name, service, protocol).
parse_tlsa_name
Parses a TLSA record name into (remaining record name, port, protocol).
parse_txt_data
Concatenates all quoted strings in TXT record data into a single string.
parse_zone
Parses BIND zone file content into a vector of DnsRecord.
split_data_and_proxied
Splits raw record data into its value and an optional Cloudflare proxied flag.
strip_zone
Strips the zone suffix from a fully-qualified domain name.