Fix Tailscale download URLs: Use dynamic version detection
- Add GitHub API integration to get latest Tailscale version - Fix broken download URLs by using correct versioned filenames - Add fallback version (1.86.2) if API call fails - Update both English and Korean PowerShell scripts - Resolves download errors in installation process 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
bd33604982
commit
5d89277e5c
@ -111,12 +111,24 @@ 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.exe"
|
||||
$downloadUrl = "https://pkgs.tailscale.com/stable/tailscale-setup.exe"
|
||||
$tempPath = "$env:TEMP\tailscale-setup-$version.exe"
|
||||
$downloadUrl = "https://pkgs.tailscale.com/stable/tailscale-setup-$version.exe"
|
||||
|
||||
try {
|
||||
Write-Status "Downloading Tailscale..."
|
||||
Write-Status "Downloading Tailscale from: $downloadUrl"
|
||||
Invoke-WebRequest -Uri $downloadUrl -OutFile $tempPath -UseBasicParsing
|
||||
|
||||
Write-Status "Installing Tailscale... (please wait)"
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
# 팜큐(FARMQ) Headscale Windows 원클릭 설치 스크립트
|
||||
# 사용법: 관리자 PowerShell에서 실행
|
||||
# FARMQ Headscale Windows One-Click Installation Script
|
||||
# Usage: Run in Administrator PowerShell
|
||||
# iex ((New-Object System.Net.WebClient).DownloadString('https://git.0bin.in/.../farmq-install.ps1'))
|
||||
|
||||
# Set UTF-8 encoding for Korean characters
|
||||
$OutputEncoding = [Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8
|
||||
[Console]::OutputEncoding = [Text.Encoding]::UTF8
|
||||
|
||||
param(
|
||||
[switch]$Force,
|
||||
[string]$HeadscaleServer = "https://head.0bin.in",
|
||||
@ -32,68 +36,68 @@ function Write-Header {
|
||||
function Write-Status {
|
||||
param([string]$Message)
|
||||
Write-Host ""
|
||||
Write-ColorOutput "🔧 $Message" "Blue"
|
||||
Write-Host "[*] $Message" -ForegroundColor Blue
|
||||
}
|
||||
|
||||
function Write-Success {
|
||||
param([string]$Message)
|
||||
Write-Host ""
|
||||
Write-ColorOutput "✅ $Message" "Green"
|
||||
Write-Host "[+] $Message" -ForegroundColor Green
|
||||
}
|
||||
|
||||
function Write-Error {
|
||||
param([string]$Message)
|
||||
Write-Host ""
|
||||
Write-ColorOutput "❌ $Message" "Red"
|
||||
Write-Host "[!] ERROR: $Message" -ForegroundColor Red
|
||||
}
|
||||
|
||||
function Write-Warning {
|
||||
param([string]$Message)
|
||||
Write-Host ""
|
||||
Write-ColorOutput "⚠️ $Message" "Yellow"
|
||||
Write-Host "[!] WARNING: $Message" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
function Write-Info {
|
||||
param([string]$Message)
|
||||
Write-Host ""
|
||||
Write-ColorOutput "📋 $Message" "Cyan"
|
||||
Write-Host "[i] $Message" -ForegroundColor Cyan
|
||||
}
|
||||
|
||||
# ================================
|
||||
# 시스템 요구사항 확인
|
||||
# ================================
|
||||
function Test-Requirements {
|
||||
Write-Status "시스템 요구사항 확인 중..."
|
||||
Write-Status "Checking system requirements..."
|
||||
|
||||
# 관리자 권한 확인
|
||||
# Check administrator privileges
|
||||
$currentUser = [Security.Principal.WindowsIdentity]::GetCurrent()
|
||||
$principal = New-Object Security.Principal.WindowsPrincipal($currentUser)
|
||||
|
||||
if (-NOT $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
|
||||
Write-Error "이 스크립트는 관리자 권한으로 실행해야 합니다."
|
||||
Write-Info "다음 방법으로 다시 실행해주세요:"
|
||||
Write-Info "1. Windows 키 + X → 'Windows PowerShell(관리자)' 클릭"
|
||||
Write-Info "2. 스크립트 명령어 다시 실행"
|
||||
Write-Error "This script requires administrator privileges."
|
||||
Write-Info "Please restart using one of these methods:"
|
||||
Write-Info "1. Windows Key + X -> 'Windows PowerShell (Admin)'"
|
||||
Write-Info "2. Run the script command again"
|
||||
Write-Host ""
|
||||
Read-Host "아무 키나 누르세요..."
|
||||
Read-Host "Press any key to exit..."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Windows 버전 확인
|
||||
# Check Windows version
|
||||
$osVersion = [System.Environment]::OSVersion.Version
|
||||
if ($osVersion.Major -lt 10) {
|
||||
Write-Warning "Windows 10 이상을 권장합니다. 현재: Windows $($osVersion.Major).$($osVersion.Minor)"
|
||||
Write-Warning "Windows 10 or later recommended. Current: Windows $($osVersion.Major).$($osVersion.Minor)"
|
||||
}
|
||||
|
||||
# 인터넷 연결 확인
|
||||
# Check internet connection
|
||||
try {
|
||||
Test-Connection "8.8.8.8" -Count 1 -Quiet | Out-Null
|
||||
Test-NetConnection "8.8.8.8" -Port 53 -InformationLevel Quiet | Out-Null
|
||||
}
|
||||
catch {
|
||||
Write-Warning "인터넷 연결을 확인해주세요."
|
||||
Write-Warning "Please check your internet connection."
|
||||
}
|
||||
|
||||
Write-Success "시스템 요구사항 확인 완료"
|
||||
Write-Success "System requirements check completed"
|
||||
}
|
||||
|
||||
# ================================
|
||||
@ -113,12 +117,24 @@ function Install-Tailscale {
|
||||
|
||||
Write-Info "Windows용 Tailscale 설치 중..."
|
||||
|
||||
# 최신 Tailscale 버전 확인
|
||||
try {
|
||||
Write-Status "최신 Tailscale 버전 확인 중..."
|
||||
$latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/tailscale/tailscale/releases/latest" -UseBasicParsing
|
||||
$version = $latestRelease.tag_name.TrimStart('v')
|
||||
Write-Info "최신 버전: $version"
|
||||
}
|
||||
catch {
|
||||
Write-Warning "최신 버전 확인 실패, 기본 버전 사용"
|
||||
$version = "1.86.2"
|
||||
}
|
||||
|
||||
# 임시 다운로드 경로
|
||||
$tempPath = "$env:TEMP\tailscale-setup.exe"
|
||||
$downloadUrl = "https://pkgs.tailscale.com/stable/tailscale-setup.exe"
|
||||
$tempPath = "$env:TEMP\tailscale-setup-$version.exe"
|
||||
$downloadUrl = "https://pkgs.tailscale.com/stable/tailscale-setup-$version.exe"
|
||||
|
||||
try {
|
||||
Write-Status "Tailscale 다운로드 중..."
|
||||
Write-Status "Tailscale 다운로드 중: $downloadUrl"
|
||||
Invoke-WebRequest -Uri $downloadUrl -OutFile $tempPath -UseBasicParsing
|
||||
|
||||
Write-Status "Tailscale 설치 중... (잠시 기다려주세요)"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user