Skip to content

HTTP_PROXY/HTTPS_PROXY environment variables ignored by undici fetch #20549

@88plug

Description

@88plug

Description

Node.js fetch (backed by undici) does not respect HTTP_PROXY/HTTPS_PROXY environment variables. Users behind corporate proxies cannot use OpenClaw — all outbound requests bypass the proxy and fail.

Repro

  1. Set HTTPS_PROXY=http://your-proxy:8080
  2. Run OpenClaw gateway or CLI
  3. Attempt any outbound API call (e.g., chat with a cloud model)
  4. Observe: request goes direct, bypassing proxy — fails in environments that block direct connections

Expected

Outbound fetch calls should route through the configured proxy, matching behavior of curl, wget, and other tools that respect these standard env vars.

Environment

  • Node.js 22+ with undici
  • Any OS
  • Any proxy configuration

Fix

PR #19660

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions