-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Open
Labels
Description
What version of Bun is running?
1.3.5
What platform is your computer?
Darwin 24.4.0 arm64 arm
What steps can reproduce the bug?
- Connect to a corporate VPN (Cisco AnyConnect) that creates a virtual interface (utunX).
- The VPN interface supports IPv4 but ONLY has a Link-Local IPv6 address (fe80::...). It does NOT have a Global IPv6 address.
- Run bun install or bun repl (which attempts to connect to registry.npmjs.org).
- The DNS resolver returns both A (IPv4) and AAAA (IPv6) records for the registry.
What is the expected behavior?
Bun should detect that the interface only has a Link-Local IPv6 address and is unable to route to Global IPv6 addresses. It should fall back to IPv4 (Happy Eyeballs algorithm) or ignore the AAAA record, similar to how Node.js and curl behave in this environment.
What do you see instead?
Bun attempts to connect via the Global IPv6 address using the Link-Local only interface. The connection hangs at 🔍 Resolving [1/1] until it times out. Setting disable_ipv6 = true in bunfig.toml did not resolve the issue in the CLI.
Additional information
Workaround: Using a local Node.js proxy and pointing HTTPS_PROXY to it works, confirming that Node.js handles this network topology correctly while Bun does not.
coderabbitai