What version of Bun is running?
1.3.11-canary.1+9e93bfa1b
What platform is your computer?
Linux 5.10.0-12-amd64 x86_64 x86_64
What steps can reproduce the bug?
Hi,
I would like to report a behavior in Bun that can be reproduced using the below snippet:
import dns from "node:dns";
console.log("Starting DNS lookup for mongo-1...");
dns.lookup("mongo-1", (err, address, family) => {
console.error("lookup callback error:", err);
console.log("address: %j family: IPv%s", address, family);
process.exit(err ? 1 : 0);
});
What is the expected behavior?
root@KContainer:~/25927# node dns_lookup.mjs
Starting DNS lookup for mongo-1...
lookup callback error: null
address: "127.0.0.1" family: IPv4
root@KContainer:~/25927# deno run -A dns_lookup.mjs
Starting DNS lookup for mongo-1...
lookup callback error: null
address: "127.0.0.1" family: IPv4
What do you see instead?
dns.lookup("mongo-1") resolves to 127.0.0.1 in Node and Deno, but returns ::1 in Bun.
This causes behavior differences in code
root@KContainer:~/25927# bun run dns_lookup.mjs
Starting DNS lookup for mongo-1...
lookup callback error: null
address: "::1" family: IPv6
Additional information
No response
What version of Bun is running?
1.3.11-canary.1+9e93bfa1b
What platform is your computer?
Linux 5.10.0-12-amd64 x86_64 x86_64
What steps can reproduce the bug?
Hi,
I would like to report a behavior in Bun that can be reproduced using the below snippet:
What is the expected behavior?
What do you see instead?
dns.lookup("mongo-1") resolves to 127.0.0.1 in Node and Deno, but returns ::1 in Bun.
This causes behavior differences in code
Additional information
No response