DNS over HTTP resolver. Uses a list of servers to resolve DNS records with HTTP requests.

Constructors

Properties

_TXTcache: default<string, string[][]>
_abortControllers: AbortController[]
_cache: default<string, string[]>
_request: Request
_servers: string[]

Methods

  • Get a shuffled array of the IP addresses currently configured for DNS resolution. These addresses are formatted according to RFC 5952. It can include a custom port.

    Returns string[]

  • Cancel all outstanding DNS queries made by this resolver. Any outstanding requests will be aborted and promises rejected.

    Returns void

  • Get an array of the IP addresses currently configured for DNS resolution. These addresses are formatted according to RFC 5952. It can include a custom port.

    Returns string[]

  • Uses the DNS protocol to resolve the given host name into the appropriate DNS record

    Parameters

    • hostname: string

      host name to resolve

    • Optional rrType: "TXT"

      resource record type

    Returns Promise<string[][]>

  • Parameters

    • hostname: string
    • rrType: "A" | "AAAA"

    Returns Promise<string[]>

  • Parameters

    • hostname: string

    Returns Promise<string[]>

  • Uses the DNS protocol to resolve the given host name into IPv4 addresses

    Parameters

    • hostname: string

      host name to resolve

    Returns Promise<string[]>

  • Uses the DNS protocol to resolve the given host name into IPv6 addresses

    Parameters

    • hostname: string

      host name to resolve

    Returns Promise<string[]>

  • Uses the DNS protocol to resolve the given host name into a Text record

    Parameters

    • hostname: string

      host name to resolve

    Returns Promise<string[][]>

  • Sets the IP address and port of servers to be used when performing DNS resolution.

    Parameters

    • servers: string[]

      array of RFC 5952 formatted addresses.

    Returns void