From 3d2e5d477ac6f1f6d4feac4102ee98fe096d1c0d Mon Sep 17 00:00:00 2001 From: stswangzhiping <59632378+stswangzhiping@users.noreply.github.com> Date: Thu, 9 Apr 2026 17:40:14 +0800 Subject: [PATCH] revert: restore TCP 7000 frpc config (WebSocket via Nginx not working) Made-with: Cursor --- lib/frpc.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/frpc.js b/lib/frpc.js index 6cdef13..2ceaf3d 100644 --- a/lib/frpc.js +++ b/lib/frpc.js @@ -144,22 +144,16 @@ function downloadFile(url, dest) { } function writeFrpcConfig(clawId, frpConfig) { - const { auth_token, dashboard_local_port = 18789 } = frpConfig; + const { server, port, auth_token, dashboard_local_port = 18789 } = frpConfig; const ttyRemotePort = 10000 + Number(clawId); - // 固定使用 WebSocket over HTTPS (443),可穿透仅开放 443 的网络环境; - // 旧版 clawd 仍使用后端下发的 server:7000(TCP),两者并存互不影响。 const toml = `# 由 clawd 自动生成,请勿手动修改 -serverAddr = "frp.claw.cutos.ai" -serverPort = 443 +serverAddr = "${server}" +serverPort = ${port} [auth] method = "token" token = "${auth_token}" -[transport] -protocol = "websocket" -tls.enable = true - [[proxies]] name = "dashboard-${clawId}" type = "http"