feat: Реализована нативная установка sing-box с системными утилитами и веб-сервером, заменяя устаревшие скрипты.

This commit is contained in:
2025-12-29 13:24:11 +03:00
parent a837072454
commit f04d04fa61
12 changed files with 1049 additions and 1320 deletions

65
manage.ps1 Normal file
View File

@@ -0,0 +1,65 @@
# ==========================================
# 🚀 VPN PROXY CONTROL CENTER (WINDOWS)
# ==========================================
# Главный скрипт управления. Запускать от имени Администратора.
$ScriptDir = if ($PSScriptRoot) { $PSScriptRoot } else { Split-Path -Parent $MyInvocation.MyCommand.Path }
$LibDir = "$ScriptDir\scripts\lib"
# Проверка библиотек
if (!(Test-Path "$LibDir\Common.ps1")) {
Write-Host "❌ Ошибка: Не найдены библиотеки в $LibDir" -ForegroundColor Red
exit 1
}
. "$LibDir\Common.ps1"
. "$LibDir\System.ps1"
Ensure-Admin
while ($true) {
Write-Header "VPN PROXY CONTROL CENTER"
# --- СБОР СТАТУСОВ ---
# 1. Native Sing-box
$sbStatus = Get-TaskStatus -Name "SingBoxProxy"
$sbStr = if ($sbStatus -eq "Running") { "РАБОТАЕТ" } else { "ОСТАНОВЛЕН" }
$sbColor = if ($sbStatus -eq "Running") { "Green" } else { "Yellow" }
if (!$sbStatus) { $sbStr = "НЕ УСТАНОВЛЕН"; $sbColor = "Gray" }
# 2. Discord Proxy
$discSvc = Get-Service -Name "ProxiFyreService" -ErrorAction SilentlyContinue
$discStr = if ($discSvc.Status -eq 'Running') { "АКТИВЕН" } else { "НЕ АКТИВЕН" }
$discColor = if ($discSvc.Status -eq 'Running') { "Green" } else { "Gray" }
# --- ОТРИСОВКА МЕНЮ ---
Write-Host " [1] 📦 VPN Клиент (Sing-box)" -NoNewline -ForegroundColor White
Write-Host " [$sbStr]" -ForegroundColor $sbColor
Write-Host " Основной способ. Поддерживает UDP и игры." -ForegroundColor Gray
Write-Host ""
Write-Host " [2] 🎮 Настройка Discord/Vesktop" -NoNewline -ForegroundColor White
Write-Host " [$discStr]" -ForegroundColor $discColor
Write-Host " Маршрутизация приложений через прокси." -ForegroundColor Gray
Write-Host ""
Write-Host " ---------------------------------------" -ForegroundColor DarkGray
Write-Host " [3] 🔄 Обновить статус" -ForegroundColor White
Write-Host " [U] ❌ Удалить всё (Uninstall)" -ForegroundColor Red
Write-Host " [q] Выход" -ForegroundColor White
Write-Host ""
$choice = Read-Host "👉 Ваш выбор"
switch ($choice) {
"1" { & "$ScriptDir\scripts\setup-singbox.ps1" }
"2" { & "$ScriptDir\scripts\setup-discord.ps1" }
"3" { continue }
"u" { & "$ScriptDir\scripts\uninstall-all.ps1" }
"q" { exit }
}
}