mirror of
https://github.com/openclaw/clawhub.git
synced 2026-08-17 10:22:12 +00:00
The CLI creates a custom undici Agent via setGlobalDispatcher() which overrides any proxy configuration. Since Node.js native fetch (backed by undici) does not automatically respect HTTP_PROXY/HTTPS_PROXY env vars, the CLI fails with 'fetch failed' on systems that require a proxy for outbound connections. Import ProxyAgent from undici and use it when any of the standard proxy environment variables (HTTPS_PROXY, HTTP_PROXY, https_proxy, http_proxy) is set. When no proxy variable is present, behavior is unchanged. Also adds proxy documentation to cli.md and a troubleshooting entry.