feat: proxy CutOS agent console

This commit is contained in:
yankun
2026-08-02 15:58:32 +08:00
parent 9489b334c5
commit 40ca8cd5af
4 changed files with 27 additions and 7 deletions
+2 -4
View File
@@ -196,9 +196,7 @@ class ClawClient {
async _proceedWithConnection() {
const [dashInfo] = await Promise.all([
this._isOpenClaw()
? getDashboardInfo().catch(e => { log.warn('clawd', 'dashboard 信息获取失败:', e.message); return null; })
: Promise.resolve({}),
getDashboardInfo(this._agentType).catch(e => { log.warn('clawd', 'dashboard 信息获取失败:', e.message); return null; }),
startTtyd().catch(e => log.warn('ttyd', '启动失败:', e.message)),
]);
this._dashInfo = dashInfo || {};
@@ -460,7 +458,7 @@ class ClawClient {
this._applyStatus(msg);
if (msg.frp && msg.frp.server && msg.frp.auth_token) {
this._frpc.start(msg.claw_id, msg.frp, this._cfg.ssh_secret_key ?? null, this._isOpenClaw()).catch(e => {
this._frpc.start(msg.claw_id, msg.frp, this._cfg.ssh_secret_key ?? null, true).catch(e => {
log.error('frpc', '启动失败:', e.message);
});
}