🆕 新增默认指令

This commit is contained in:
chaos-zhu 2024-08-15 10:45:40 +08:00
parent e0b12a98e8
commit c3a689cc96
2 changed files with 5 additions and 10 deletions

View File

@ -13,5 +13,10 @@
"name": "查询本机公网IP",
"command": "curl ifconfig.me",
"description": "查询本机公网IP"
},
{
"name": "生成ssh密钥对",
"command": "ssh-keygen -t rsa -b 2048",
"description": "生成ssh密钥对"
}
]

View File

@ -17,16 +17,6 @@ function createInteractiveShell(socket, sshClient) {
sshClient.end()
})
socket.emit('connect_shell_success') // 已连接终端web端可以执行指令了
// web端输入
// socket.on('input', key => {
// if (sshClient._sock.writable === false) return consola.info('终端连接已关闭,禁止输入')
// stream.write(key)
// })
// 监听按键重置终端大小
// socket.on('resize', ({ rows, cols }) => {
// // consola.info('更改tty终端行&列: ', { rows, cols })
// stream.setWindow(rows, cols)
// })
})
})
}