fix(windows): use pkgs stable 'latest' installer to avoid 404

GitHub의 releases/latest 태그(예: 1.98.3)와 pkgs.tailscale.com/stable
채널 버전(예: 1.98.4)이 어긋나면 tailscale-setup-<버전>.exe URL이 404가
난다. 버전 조립을 없애고 항상 존재하는 tailscale-setup-latest.exe를 사용.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
PharmQ Admin
2026-05-30 15:54:29 +00:00
parent e778ecd4fc
commit 7f3a6b9302
2 changed files with 16 additions and 32 deletions

View File

@@ -110,22 +110,14 @@ function Install-Tailscale {
}
Write-Info "Installing Tailscale for Windows..."
# Get latest Tailscale version
try {
Write-Status "Getting latest Tailscale version..."
$latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/tailscale/tailscale/releases/latest" -UseBasicParsing
$version = $latestRelease.tag_name.TrimStart('v')
Write-Info "Latest version: $version"
}
catch {
Write-Warning "Failed to get latest version, using fallback"
$version = "1.86.2"
}
# Temporary download path
$tempPath = "$env:TEMP\tailscale-setup-$version.exe"
$downloadUrl = "https://pkgs.tailscale.com/stable/tailscale-setup-$version.exe"
# Always use the 'latest' installer from the official stable channel.
# NOTE: GitHub's "latest release" tag and pkgs.tailscale.com/stable can be out
# of sync (e.g. GitHub reports 1.98.3 while stable already serves 1.98.4), so
# building a versioned URL such as tailscale-setup-<version>.exe results in a
# 404. The 'latest' alias always exists, so we use it directly.
$downloadUrl = "https://pkgs.tailscale.com/stable/tailscale-setup-latest.exe"
$tempPath = "$env:TEMP\tailscale-setup-latest.exe"
try {
Write-Status "Downloading Tailscale from: $downloadUrl"