Skip to content

Compiled binary ignores NODE_OPTIONS dns-result-order and often NO_PROXY #47041

Description

@RaviTharuma

Summary

The compiled OpenCode binary (Bun) ignores NODE_OPTIONS=--dns-result-order=ipv4first. It also often ignores NO_PROXY when HTTP_PROXY/ALL_PROXY are set, so loopback HTTP backends get sent through CONNECT.

Repro

  1. Dual-stack DNS where AAAA is unusable and A works.
  2. NODE_OPTIONS=--dns-result-order=ipv4first opencode run against https://gateway.example/v1.
  3. Alternatively set HTTPS_PROXY=http://127.0.0.1:PORT, NO_PROXY=127.0.0.1, HTTP_PROXY/ALL_PROXY to the same proxy, and call http://127.0.0.1:OTHER/v1.

Actual

Compiled binary still uses AAAA (or sends loopback through CONNECT). Node/bun scripts with the same env work.

Expected

Honor NODE_OPTIONS DNS order, or document that compiled builds do not. Honor NO_PROXY for loopback even when ALL_PROXY is set.

Suggested fix

Compile with Bun env-proxy plus dns-result-order support, or document the limitation in CLI networking docs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions