{"id":300,"date":"2026-03-21T22:47:26","date_gmt":"2026-03-21T14:47:26","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/web-index\/"},"modified":"2026-03-21T23:30:48","modified_gmt":"2026-03-21T15:30:48","slug":"web-index","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/web-index\/","title":{"rendered":"\u7f51\u9875\u7aef"},"content":{"rendered":"<h1>Web<\/h1>\n<h1>Web\uff08Gateway \u7f51\u5173\uff09<\/h1>\n<p>Gateway \u7f51\u5173\u4ece\u4e0e Gateway \u7f51\u5173 WebSocket \u76f8\u540c\u7684\u7aef\u53e3\u63d0\u4f9b\u4e00\u4e2a\u5c0f\u578b<strong>\u6d4f\u89c8\u5668 Control UI<\/strong>\uff08Vite + Lit\uff09\uff1a<\/p>\n<ul>\n<li>\u9ed8\u8ba4\uff1a<code>http:\/\/&lt;host&gt;:18789\/<\/code><\/li>\n<li>\u53ef\u9009\u524d\u7f00\uff1a\u8bbe\u7f6e <code>gateway.controlUi.basePath<\/code>\uff08\u4f8b\u5982 <code>\/openclaw<\/code>\uff09<\/li>\n<\/ul>\n<p>\u529f\u80fd\u8be6\u89c1 <a href=\"\/web\/control-ui\">Control UI<\/a>\u3002<br \/>\n\u672c\u9875\u91cd\u70b9\u4ecb\u7ecd\u7ed1\u5b9a\u6a21\u5f0f\u3001\u5b89\u5168\u548c\u9762\u5411 Web \u7684\u754c\u9762\u3002<\/p>\n<h2>Webhooks<\/h2>\n<p>\u5f53 <code>hooks.enabled=true<\/code> \u65f6\uff0cGateway \u7f51\u5173\u8fd8\u5728\u540c\u4e00 HTTP \u670d\u52a1\u5668\u4e0a\u516c\u5f00\u4e00\u4e2a\u5c0f\u578b webhook \u7aef\u70b9\u3002<br \/>\n\u53c2\u89c1 <a href=\"\/gateway\/configuration\">Gateway \u7f51\u5173\u914d\u7f6e<\/a> \u2192 <code>hooks<\/code> \u4e86\u89e3\u8ba4\u8bc1 + \u8f7d\u8377\u3002<\/p>\n<h2>\u914d\u7f6e\uff08\u9ed8\u8ba4\u5f00\u542f\uff09<\/h2>\n<p>\u5f53\u8d44\u6e90\u5b58\u5728\u65f6\uff08<code>dist\/control-ui<\/code>\uff09\uff0cControl UI <strong>\u9ed8\u8ba4\u542f\u7528<\/strong>\u3002<br \/>\n\u4f60\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u63a7\u5236\u5b83\uff1a<\/p>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  gateway: {<br \/>\n    controlUi: { enabled: true, basePath: &#8220;\/openclaw&#8221; }, \/\/ basePath \u53ef\u9009<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n## Tailscale \u8bbf\u95ee\n\n### \u96c6\u6210 Serve\uff08\u63a8\u8350\uff09\n\n\u4fdd\u6301 Gateway \u7f51\u5173\u5728\u672c\u5730\u56de\u73af\u4e0a\uff0c\u8ba9 Tailscale Serve \u4ee3\u7406\u5b83\uff1a\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  gateway: {\n    bind: &quot;loopback&quot;,\n    tailscale: { mode: &quot;serve&quot; },\n  },\n}\n<\/code><\/pre>\n<p>\u7136\u540e\u542f\u52a8 Gateway \u7f51\u5173\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw gateway<\/p>\n<pre><code>\n\u6253\u5f00\uff1a\n\n* `https:\/\/&lt;magicdns&gt;\/`\uff08\u6216\u4f60\u914d\u7f6e\u7684 `gateway.controlUi.basePath`\uff09\n\n### Tailnet \u7ed1\u5b9a + \u4ee4\u724c\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  gateway: {\n    bind: &quot;tailnet&quot;,\n    controlUi: { enabled: true },\n    auth: { mode: &quot;token&quot;, token: &quot;your-token&quot; },\n  },\n}\n<\/code><\/pre>\n<p>\u7136\u540e\u542f\u52a8 Gateway \u7f51\u5173\uff08\u975e\u672c\u5730\u56de\u73af\u7ed1\u5b9a\u9700\u8981\u4ee4\u724c\uff09\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw gateway<\/p>\n<pre><code>\n\u6253\u5f00\uff1a\n\n* `http:\/\/&lt;tailscale-ip&gt;:18789\/`\uff08\u6216\u4f60\u914d\u7f6e\u7684 `gateway.controlUi.basePath`\uff09\n\n### \u516c\u5171\u4e92\u8054\u7f51\uff08Funnel\uff09\n\n```json5  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  gateway: {\n    bind: &quot;loopback&quot;,\n    tailscale: { mode: &quot;funnel&quot; },\n    auth: { mode: &quot;password&quot; }, \/\/ \u6216 OPENCLAW_GATEWAY_PASSWORD\n  },\n}\n<\/code><\/pre>\n<h2>\u5b89\u5168\u6ce8\u610f\u4e8b\u9879<\/h2>\n<ul>\n<li>Gateway \u7f51\u5173\u8ba4\u8bc1\u9ed8\u8ba4\u662f\u5fc5\u9700\u7684\uff08\u4ee4\u724c\/\u5bc6\u7801\u6216 Tailscale \u8eab\u4efd\u5934\uff09\u3002<\/li>\n<li>\u975e\u672c\u5730\u56de\u73af\u7ed1\u5b9a\u4ecd\u7136<strong>\u9700\u8981<\/strong>\u5171\u4eab\u4ee4\u724c\/\u5bc6\u7801\uff08<code>gateway.auth<\/code> \u6216\u73af\u5883\u53d8\u91cf\uff09\u3002<\/li>\n<li>\u5411\u5bfc\u9ed8\u8ba4\u751f\u6210 Gateway \u7f51\u5173\u4ee4\u724c\uff08\u5373\u4f7f\u5728\u672c\u5730\u56de\u73af\u4e0a\uff09\u3002<\/li>\n<li>UI \u53d1\u9001 <code>connect.params.auth.token<\/code> \u6216 <code>connect.params.auth.password<\/code>\u3002<\/li>\n<li>\u4f7f\u7528 Serve \u65f6\uff0c\u5f53 <code>gateway.auth.allowTailscale<\/code> \u4e3a <code>true<\/code> \u65f6\uff0cTailscale \u8eab\u4efd\u5934\u53ef\u4ee5\u6ee1\u8db3\u8ba4\u8bc1\uff08\u65e0\u9700\u4ee4\u724c\/\u5bc6\u7801\uff09\u3002\u8bbe\u7f6e <code>gateway.auth.allowTailscale: false<\/code> \u4ee5\u8981\u6c42\u663e\u5f0f\u51ed\u8bc1\u3002\u53c2\u89c1 <a href=\"\/gateway\/tailscale\">Tailscale<\/a> \u548c <a href=\"\/gateway\/security\">\u5b89\u5168<\/a>\u3002<\/li>\n<li><code>gateway.tailscale.mode: \"funnel\"<\/code> \u9700\u8981 <code>gateway.auth.mode: \"password\"<\/code>\uff08\u5171\u4eab\u5bc6\u7801\uff09\u3002<\/li>\n<\/ul>\n<h2>\u6784\u5efa UI<\/h2>\n<p>Gateway \u7f51\u5173\u4ece <code>dist\/control-ui<\/code> \u63d0\u4f9b\u9759\u6001\u6587\u4ef6\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6784\u5efa\uff1a<\/p>\n<p><code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\npnpm ui:build # \u9996\u6b21\u8fd0\u884c\u65f6\u81ea\u52a8\u5b89\u88c5 UI \u4f9d\u8d56<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Web Web\uff08Gateway \u7f51\u5173\uff09 Gateway \u7f51\u5173\u4ece\u4e0e Gateway \u7f51\u5173 WebSocket \u76f8 [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-300","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=300"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/300\/revisions"}],"predecessor-version":[{"id":886,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/300\/revisions\/886"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}