Skip to content

DNS resolution prefers Global IPv6 on Link-Local only interface (VPN/Cisco AnyConnect) causes timeout #25619

@shisashi

Description

@shisashi

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?

  1. Connect to a corporate VPN (Cisco AnyConnect) that creates a virtual interface (utunX).
  2. The VPN interface supports IPv4 but ONLY has a Link-Local IPv6 address (fe80::...). It does NOT have a Global IPv6 address.
  3. Run bun install or bun repl (which attempts to connect to registry.npmjs.org).
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions