Install
openclaw skills install whatsapp-428-fix修复 WhatsApp Web 连接 428 错误和代理配置问题。当用户遇到 WhatsApp 连接断开 (status 428)、需要配置代理、或在新机器上部署 OpenClaw 后遇到 WhatsApp 连接问题时使用此 Skill。
openclaw skills install whatsapp-428-fix运行自动修复脚本:
bash /home/admind/.openclaw/workspace/skills/whatsapp-428-fix/scripts/fix-whatsapp-428.sh
openclaw status --deep
openclaw channels status
LOCAL_IP=$(hostname -I | awk '{print $1}')
echo "本地IP: $LOCAL_IP"
编辑 ~/.config/systemd/user/openclaw-gateway.service,添加代理环境变量:
[Service]
Environment=HTTP_PROXY=http://LOCAL_IP:10808
Environment=HTTPS_PROXY=http://LOCAL_IP:10808
Environment=ALL_PROXY=http://LOCAL_IP:10808
systemctl --user daemon-reload
openclaw gateway restart
openclaw logs --follow | grep -i whatsapp
需要修改 OpenClaw 源码以支持 proxy,按以下步骤修改:
在 auth-profiles-*.js 的 WhatsAppSharedSchema 中添加:
proxy: z.string().url().optional()
添加 HttpsProxyAgent 支持:
import { HttpsProxyAgent } from "https-proxy-agent";
// 在 makeWASocket 调用中添加 agent
const agent = new HttpsProxyAgent(opts.proxy);
在 channel-web-*.js 中传入 proxy 参数:
const sock = await createWaSocket(false, options.verbose, {
authDir: options.authDir,
proxy: options.proxy
});
proxy: account.proxy