From 7e33976d515b7c6565303bf8d81c71f69ba2889c Mon Sep 17 00:00:00 2001 From: yinxue <2643126914@qq.com> Date: Mon, 3 Nov 2025 15:21:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=BB=8Eopen=20with=20vscode?= =?UTF-8?q?=E5=90=8E=E8=87=AA=E5=8A=A8=E8=BF=9B=E5=85=A5home=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/remote-container.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/remote-container.ts b/src/remote-container.ts index 059c098..5900ea5 100644 --- a/src/remote-container.ts +++ b/src/remote-container.ts @@ -92,7 +92,8 @@ export default class RemoteContainer { } else { console.log(`[RemoteContainer] Running in local environment, attempting firstConnect`); try { - await this.firstConnect(host, hostname, username, port) + //传入真实IP + await this.firstConnect(host, '192.168.10.4', username, port) .then((res) => { if (res === 'success') { console.log(`[RemoteContainer] firstConnect succeeded, opening remote folder`); @@ -318,7 +319,7 @@ export default class RemoteContainer { let terminal = vscode.window.activeTerminal || vscode.window.createTerminal(`Ext Terminal`); terminal.show(true); - const command = `code --remote ssh-remote+${username}@${host}:${port} ${path} --reuse-window`; + const command = `code --remote ssh-remote+root@${host}:${port} ${path} --reuse-window`; console.log(`[RemoteContainer] Sending command to terminal: ${command}`); // 在原窗口打开