ဝဘ် (Gateway)¶
Gateway သည် Gateway WebSocket နှင့် တူညီသော ပို့တ်မှ ဘရောက်ဇာ Control UI (Vite + Lit) အသေးစားကို ဆောင်ရွက်ပေးပါသည်—
- မူလတန်ဖိုး:
http://<host>:18789/ - ရွေးချယ်နိုင်သော prefix:
gateway.controlUi.basePathကို သတ်မှတ်ပါ (ဥပမာ/openclaw)
- Capabilities များကို Control UI တွင် ရှိပါသည်။
- ဤစာမျက်နှာသည် bind modes၊ လုံခြုံရေး နှင့် web-facing surfaces များကို အဓိကထား ဖော်ပြပါသည်။
Webhooks¶
hooks.enabled=trueဖြစ်ပါက Gateway သည် တူညီသော HTTP server ပေါ်တွင် webhook endpoint အသေးတစ်ခုကိုပါ ဖော်ပြပါသည်။- auth + payloads အတွက် Gateway configuration →
hooksကို ကြည့်ပါ။
Config (မူလအားဖြင့် ဖွင့်ထားသည်)¶
- assets (
dist/control-ui) ရှိပါက Control UI ကို default အနေဖြင့် enable လုပ်ထားပါသည်။ - config ဖြင့် ထိန်းချုပ်နိုင်ပါသည်:
{
gateway: {
controlUi: { enabled: true, basePath: "/openclaw" }, // basePath optional
},
}
Tailscale ဖြင့် ဝင်ရောက်ခြင်း¶
Integrated Serve (အကြံပြုထားသည်)¶
Gateway ကို loopback ပေါ်တွင် ထားပြီး Tailscale Serve ဖြင့် proxy လုပ်ပါ—
{
gateway: {
bind: "loopback",
tailscale: { mode: "serve" },
},
}
ထို့နောက် gateway ကို စတင်ပါ—
openclaw gateway
ဖွင့်ရန်—
https://<magicdns>/(သို့မဟုတ် သင် သတ်မှတ်ထားသောgateway.controlUi.basePath)
Tailnet bind + token¶
{
gateway: {
bind: "tailnet",
controlUi: { enabled: true },
auth: { mode: "token", token: "your-token" },
},
}
ထို့နောက် gateway ကို စတင်ပါ (loopback မဟုတ်သော bind များအတွက် token လိုအပ်ပါသည်)—
openclaw gateway
ဖွင့်ရန်—
http://<tailscale-ip>:18789/(သို့မဟုတ် သင် သတ်မှတ်ထားသောgateway.controlUi.basePath)
အများပြည်သူ အင်တာနက် (Funnel)¶
{
gateway: {
bind: "loopback",
tailscale: { mode: "funnel" },
auth: { mode: "password" }, // or OPENCLAW_GATEWAY_PASSWORD
},
}
လုံခြုံရေး မှတ်ချက်များ¶
- Gateway auth ကို မူလအားဖြင့် လိုအပ်ပါသည် (token/password သို့မဟုတ် Tailscale identity headers)။
- Loopback မဟုတ်သော bind များတွင် မဖြစ်မနေ မျှဝေထားသော token/password (
gateway.authသို့မဟုတ် env) ကို လိုအပ်ပါသည်။ - wizard သည် loopback ပေါ်တွင်တောင် မူလအားဖြင့် gateway token တစ်ခုကို ဖန်တီးပေးပါသည်။
- UI သည်
connect.params.auth.tokenသို့မဟုတ်connect.params.auth.passwordကို ပို့ပေးပါသည်။ - Control UI သည် anti-clickjacking headers များကို ပို့ပြီး
gateway.controlUi.allowedOriginsကို မသတ်မှတ်ထားပါက same-origin ဘရောက်ဇာ websocket ချိတ်ဆက်မှုများကိုသာ လက်ခံပါသည်။ gateway.tailscale.mode: "funnel"သည်gateway.auth.mode: "password"(မျှဝေထားသော password) ကို လိုအပ်ပါသည်။
UI ကို တည်ဆောက်ခြင်း¶
- Gateway သည် static files များကို
dist/control-uiမှ serve လုပ်ပါသည်။ 32. အောက်ပါအတိုင်း build လုပ်ပါ:
pnpm ui:build # auto-installs UI deps on first run