From 7d62cf008f5c25ac8b8a78c1b0829bff2deec292 Mon Sep 17 00:00:00 2001 From: Thomas SharedInbox Date: Sat, 6 Jun 2026 23:41:13 +0200 Subject: [PATCH] fix(ci): forward SSH tunnel directly to dagger engine socket Eliminates the socat bridge dependency by using OpenSSH's built-in Unix socket forwarding (-L port:socket_path). The dagger user already owns /run/dagger/engine.sock so no intermediate TCP listener is needed. Co-Authored-By: Claude Sonnet 4.6 --- scripts/setup_dagger_remote.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/setup_dagger_remote.sh b/scripts/setup_dagger_remote.sh index 0f01768..974e93a 100755 --- a/scripts/setup_dagger_remote.sh +++ b/scripts/setup_dagger_remote.sh @@ -76,11 +76,12 @@ if [ "$_elapsed" -gt 10 ]; then echo "::warning::ssh-keyscan took ${_elapsed}s — Dagger engine host may be slow to respond" fi -# Create a background SSH tunnel to the Dagger engine. -# We map local port 8080 to remote port 1774 (where our socat bridge is listening). +# Create a background SSH tunnel to the Dagger engine Unix socket. +# Forwards local TCP port 8080 directly to /run/dagger/engine.sock on the remote host, +# eliminating the need for a socat bridge on the server side. echo "Establishing SSH tunnel to $DAGGER_ENGINE_HOST..." _t0=$SECONDS -timeout 30 ssh -i ~/.ssh/dagger_key -o StrictHostKeyChecking=no -f -N -L 8080:localhost:1774 "dagger@$DAGGER_ENGINE_HOST" +timeout 30 ssh -i ~/.ssh/dagger_key -o StrictHostKeyChecking=no -f -N -L 8080:/run/dagger/engine.sock "dagger@$DAGGER_ENGINE_HOST" _elapsed=$(( SECONDS - _t0 )) if [ "$_elapsed" -gt 10 ]; then echo "::warning::SSH tunnel setup took ${_elapsed}s"