On this page

    M

    dns.getServers

    History
    dns.getServers(): string[]
    Returns:string[]

    Returns an array of IP address strings, formatted according to RFC 5952, that are currently configured for DNS resolution. A string will include a port section if a custom port is used.

    [
      "8.8.8.8",
      "2001:4860:4860::8888",
      "8.8.8.8:1053",
      "[2001:4860:4860::8888]:1053",
    ]