Use the DNS result order returned by the OS

Effectively, this stops Node from always preferring IPv4.
This commit is contained in:
sfan5 2022-02-14 22:51:40 +01:00
parent 1ed4f57afc
commit 17b174dddb

View File

@ -25,4 +25,11 @@ if (!require("semver").satisfies(process.version, pkg.engines.node)) {
process.exit(1); process.exit(1);
} }
const dns = require("dns");
// Set DNS result order early before anything that may depend on it happens.
if (dns.setDefaultResultOrder) {
dns.setDefaultResultOrder("verbatim");
}
require("./src/command-line"); require("./src/command-line");