DNS
export const getDnsServers = (type: "ICANN" | "HNS"): string[] => { const dnsServers = { ICANN: ["0.0.0.0", "1.1.1.1"], HNS: ["103.196.38.38", "103.196.38.39"], }; return dnsServers[type];};
key | value |
---|---|
getDnsServers | This function returns an array of DNS servers of the specified type. |
ICANN | ICANN DNS servers |
HNS | Handshake DNS servers |
dnsServers | This is the list of DNS servers. |
type | This is the type of DNS servers to return. |
In this module, you can find the getDnsServers
function, which returns an array of DNS server IP addresses based on the specified type. The type can either be "ICANN" for ICANN DNS servers or "HNS" for Handshake DNS servers. The function uses a dnsServers
object that holds the IP addresses for both types and returns the corresponding array based on the input type.