fix: Windows download — TLS12 + WebClient fallback

Invoke-WebRequest fails without TLS12 on some Windows.
Use System.Net.WebClient with explicit TLS12 and User-Agent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Андрей Бобырев
2026-05-20 22:56:04 +03:00
parent 395b3bde8b
commit 2d924a98cb
2 changed files with 17 additions and 4 deletions

View File

@@ -5,7 +5,7 @@
СПОСОБ 1 — Одна команда (рекомендуется)
Скопируй и вставь в PowerShell:
irm https://raw.githubusercontent.com/andrey271192/ssh-manage/main/full_install.ps1 -OutFile $env:TEMP\pca_install.ps1; powershell -ExecutionPolicy Bypass -File $env:TEMP\pca_install.ps1
[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; $wc=New-Object Net.WebClient; $wc.Headers.Add('User-Agent','PCA'); $wc.DownloadFile('https://raw.githubusercontent.com/andrey271192/ssh-manage/main/full_install.ps1',"$env:TEMP\pca_install.ps1"); powershell -ExecutionPolicy Bypass -File $env:TEMP\pca_install.ps1
Что произойдёт:
- Скачает установщик с GitHub