Bug Description
In OpenClaw 2026.4.2, the web_fetch tool does not respect HTTP_PROXY/HTTPS_PROXY environment variables even when they are correctly configured in the systemd service.
Root Cause
In http-client-COwW1KRl.js line 111:
dispatcher = createPinnedDispatcher(
await resolvePinnedHostnameWithPolicy(currentUrl.hostname, { policy: params.ssrfPolicy }),
params.dispatcherPolicy,
params.ssrfPolicy
);
In ssrf-BWlfjI7J.js, createPinnedDispatcher() checks policy.mode:
if (!policy || policy.mode === "direct") return new Agent({...});
if (policy.mode === "env-proxy") return new EnvHttpProxyAgent({...});
Because params.dispatcherPolicy is never set to {mode: "env-proxy"}, the dispatcher always falls back to a direct Agent.
Suggested Fix
Detect HTTP_PROXY/HTTPS_PROXY and pass {mode: "env-proxy"} as dispatcherPolicy.
Environment
- OpenClaw: 2026.4.2
- Node.js: v24.14.1
- OS: Linux 6.8.0-107-generic (Ubuntu 24.04/x64)
Bug Description
In OpenClaw 2026.4.2, the
web_fetchtool does not respectHTTP_PROXY/HTTPS_PROXYenvironment variables even when they are correctly configured in the systemd service.Root Cause
In
http-client-COwW1KRl.jsline 111:In
ssrf-BWlfjI7J.js,createPinnedDispatcher()checkspolicy.mode:Because
params.dispatcherPolicyis never set to{mode: "env-proxy"}, the dispatcher always falls back to a directAgent.Suggested Fix
Detect
HTTP_PROXY/HTTPS_PROXYand pass{mode: "env-proxy"}as dispatcherPolicy.Environment