From 6a0d4694f04e188b2b65e6f62d19fa6b982dd604 Mon Sep 17 00:00:00 2001 From: Shiloh Fen Date: Sun, 14 Sep 2025 10:15:39 -0500 Subject: [PATCH] pods-remote (new script) Signed-off-by: Shiloh Fen --- scripts/pods-remote.nu | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 scripts/pods-remote.nu diff --git a/scripts/pods-remote.nu b/scripts/pods-remote.nu new file mode 100755 index 0000000..85be0ef --- /dev/null +++ b/scripts/pods-remote.nu @@ -0,0 +1,16 @@ +#!/usr/bin/env nu +# SPDX-License-Identifier: AGPL-3.0-only +# Copyright (c) 2025 Shiloh Fen + +# This will not work with Tailscale SSH, see https://github.com/tailscale/tailscale/issues/5295 +def main [ + remote: string + --uid (-u): int # Remote user ID + --name (-n): string # Socket name +] { + let local_sock = $env.XDG_RUNTIME_DIR | path join 'pods-remote' ($name | default $'($uid).sock') + mkdir $"($env.XDG_RUNTIME_DIR)/pods-remote" + print $"URL: unix://($local_sock)" + ssh -NTL $"($local_sock):/run/user/($uid)/podman/podman.sock" $remote + rm $local_sock +} -- 2.51.2