From bc65d7c7e257cc2cc8e8dd2ed6e8b951b4b8dca8 Mon Sep 17 00:00:00 2001 From: chenxi Date: Mon, 28 Sep 2026 10:53:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E7=95=99=E7=8B=AC=E7=AB=8B=E5=A2=9E?= =?UTF-8?q?=E9=87=8F=E9=95=9C=E5=83=8F=E9=9A=A7=E9=81=93=E8=BF=9B=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/deploy-from-workstation.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/deploy-from-workstation.ps1 b/scripts/deploy-from-workstation.ps1 index 00e343e1..cb2695e6 100644 --- a/scripts/deploy-from-workstation.ps1 +++ b/scripts/deploy-from-workstation.ps1 @@ -30,6 +30,7 @@ $repoRoot = (Resolve-Path (Join-Path $scriptRoot '..')).Path . (Join-Path $scriptRoot 'deploy-auth.ps1') $authSession = $null $sshOptions = @() +$tunnelSshOptions = @() $scpOptions = @() if ($IsMacOS) { $scpOptions += '-O' } $sshControlPath = if ($IsMacOS) { "/tmp/caiwu-ssh-$PID-$([Guid]::NewGuid().ToString('N')).sock" } else { $null } @@ -280,7 +281,7 @@ function Start-RegistryTunnel { $startInfo.FileName = $sshPath $startInfo.UseShellExecute = $false $startInfo.CreateNoWindow = $true - foreach ($argument in ($sshOptions + @( + foreach ($argument in ($tunnelSshOptions + @( '-N', '-o', 'ConnectTimeout=10', '-o', 'ExitOnForwardFailure=yes', @@ -347,6 +348,7 @@ try { $authSession = Start-CaiwuDeploymentAuth -Server $Server -SshUser $SshUser -KeyPath $KeyPath -Password $Password -UpdatePassword:$UpdatePassword $sshOptions = $authSession.Options + $tunnelSshOptions = @($sshOptions) if ($sshControlPath) { $sshOptions += @('-o', 'ControlMaster=auto', '-o', 'ControlPersist=600', '-o', "ControlPath=$sshControlPath") }