-
-
Notifications
You must be signed in to change notification settings - Fork 68.9k
[Bug]: HTTP_PROXY is ignored #2102
Copy link
Copy link
Closed as not planned
Labels
bugSomething isn't workingSomething isn't workingstaleMarked as stale due to inactivityMarked as stale due to inactivity
Description
edit:
This approach can still fix the issue, note that you should also add the HTTPS_PROXY and HTTP_PROXY to $HOME/.config/systemd/user/openclaw-gateway.service:
For example:
[Service]
...
Environment="HTTP_PROXY=http://172.25.128.1:10810"
Environment="HTTPS_PROXY=http://172.25.128.1:10810"
original content:
clawdbot cannot use HTTP_PROXY and HTTPS_PROXY set in the environment variables, because the nature of the undici.
Workaround for folks who met the same issue:
Find the openclaw.mjs by running:
readlink -f "$(which openclaw)"Then add the following code in openclaw.mjs after all import statements:
import { ProxyAgent, setGlobalDispatcher } from "undici";
const proxy =
process.env.HTTPS_PROXY ||
process.env.HTTP_PROXY;
if (proxy) {
setGlobalDispatcher(new ProxyAgent(proxy));
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingstaleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Give feedbackNo fields configured for issues without a type.