feat: SSH STCP key generation and frp tunnel registration
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -370,15 +370,16 @@ class ClawClient {
|
||||
|
||||
_sendConnect() {
|
||||
const msg = {
|
||||
type: 'connect',
|
||||
box_id: this._boxId,
|
||||
claw_id: this._cfg.claw_id ?? null,
|
||||
token: this._cfg.token ?? null,
|
||||
version: CLAWD_VERSION,
|
||||
type: 'connect',
|
||||
box_id: this._boxId,
|
||||
claw_id: this._cfg.claw_id ?? null,
|
||||
token: this._cfg.token ?? null,
|
||||
version: CLAWD_VERSION,
|
||||
ssh_secret_key: this._cfg.ssh_secret_key ?? null,
|
||||
local_ip: getLocalIps(),
|
||||
local_networks: getLocalNetworks(),
|
||||
external_ip: this._externalIp ?? null,
|
||||
location: this._location ?? null,
|
||||
location: this._location ?? null,
|
||||
...this._dashInfo,
|
||||
};
|
||||
this._send(msg);
|
||||
@@ -437,7 +438,7 @@ class ClawClient {
|
||||
this._applyStatus(msg);
|
||||
|
||||
if (msg.frp && msg.frp.server && msg.frp.auth_token) {
|
||||
this._frpc.start(msg.claw_id, msg.frp).catch(e => {
|
||||
this._frpc.start(msg.claw_id, msg.frp, this._cfg.ssh_secret_key ?? null).catch(e => {
|
||||
log.error('frpc', '启动失败:', e.message);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user