From cb7edb669faf84fc6991fff8ca011efe7c092fec Mon Sep 17 00:00:00 2001 From: Ghost Date: Sun, 18 Jan 2026 18:59:58 -0800 Subject: [PATCH] Voice-call: fix tailscale tunnel path --- extensions/voice-call/src/tunnel.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/extensions/voice-call/src/tunnel.ts b/extensions/voice-call/src/tunnel.ts index ad69eebf0..973c7b70f 100644 --- a/extensions/voice-call/src/tunnel.ts +++ b/extensions/voice-call/src/tunnel.ts @@ -230,12 +230,13 @@ export async function startTailscaleTunnel(config: { throw new Error("Could not get Tailscale DNS name. Is Tailscale running?"); } - const localUrl = `http://127.0.0.1:${config.port}`; + const path = config.path.startsWith("/") ? config.path : `/${config.path}`; + const localUrl = `http://127.0.0.1:${config.port}${path}`; return new Promise((resolve, reject) => { const proc = spawn( "tailscale", - [config.mode, "--bg", "--yes", "--set-path", config.path, localUrl], + [config.mode, "--bg", "--yes", "--set-path", path, localUrl], { stdio: ["ignore", "pipe", "pipe"] }, ); @@ -247,7 +248,7 @@ export async function startTailscaleTunnel(config: { proc.on("close", (code) => { clearTimeout(timeout); if (code === 0) { - const publicUrl = `https://${dnsName}${config.path}`; + const publicUrl = `https://${dnsName}${path}`; console.log( `[voice-call] Tailscale ${config.mode} active: ${publicUrl}`, ); @@ -256,7 +257,7 @@ export async function startTailscaleTunnel(config: { publicUrl, provider: `tailscale-${config.mode}`, stop: async () => { - await stopTailscaleTunnel(config.mode, config.path); + await stopTailscaleTunnel(config.mode, path); }, }); } else {