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

View File

@@ -116,22 +116,14 @@ function Install-Tailscale {
} }
Write-Info "Windows용 Tailscale 설치 중..." Write-Info "Windows용 Tailscale 설치 중..."
# 최신 Tailscale 버전 확인 # 공식 stable 채널의 'latest' 설치 파일을 항상 사용한다.
try { # 주의: GitHub "최신 릴리스" 태그와 pkgs.tailscale.com/stable 채널 버전이
Write-Status "최신 Tailscale 버전 확인 중..." # 어긋날 수 있다(예: GitHub=1.98.3 인데 stable=1.98.4). 그래서
$latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/tailscale/tailscale/releases/latest" -UseBasicParsing # tailscale-setup-<버전>.exe 식으로 URL을 조립하면 404가 난다.
$version = $latestRelease.tag_name.TrimStart('v') # 'latest' 별칭은 항상 존재하므로 이걸 직접 사용한다.
Write-Info "최신 버전: $version" $downloadUrl = "https://pkgs.tailscale.com/stable/tailscale-setup-latest.exe"
} $tempPath = "$env:TEMP\tailscale-setup-latest.exe"
catch {
Write-Warning "최신 버전 확인 실패, 기본 버전 사용"
$version = "1.86.2"
}
# 임시 다운로드 경로
$tempPath = "$env:TEMP\tailscale-setup-$version.exe"
$downloadUrl = "https://pkgs.tailscale.com/stable/tailscale-setup-$version.exe"
try { try {
Write-Status "Tailscale 다운로드 중: $downloadUrl" Write-Status "Tailscale 다운로드 중: $downloadUrl"