Files
Go-VPN-Client/main.go
arkonsadter e0a5f0f746 feat(gui): add GUI (Test) implementation with documentation and admin support
- Add GUI (Test) module with Fyne-based interface (internal/gui/gui.go, internal/gui/server.go)
- Add CLI monitoring capability (internal/cli/monitor.go)
- Add main_cli.go entry point for CLI-only builds
- Add comprehensive documentation suite covering setup, build, quick start, and changelog
- Add admin manifest (admin.manifest) for Windows UAC elevation support
- Add rsrc.syso.json configuration for resource embedding
- Update .gitignore to exclude build scripts (*.bat, *.sh)
- Update main.go and cli.go to support dual GUI (Test)/CLI modes
- Update README.md with new project information
- Enables users to build and run both GUI (Test)and CLI versions with proper admin privileges on Windows
2026-04-06 18:57:58 +06:00

34 lines
776 B
Go

package main
import (
"fmt"
"os"
"vpn-client/internal/cli"
"vpn-client/internal/config"
"vpn-client/internal/gui"
)
func main() {
// Инициализация конфигурации
if err := config.Init(); err != nil {
fmt.Fprintf(os.Stderr, "Ошибка инициализации: %v\n", err)
os.Exit(1)
}
// Проверяем аргументы командной строки
if len(os.Args) > 1 && os.Args[1] == "--cli" {
// Запуск CLI режима
if err := cli.Run(); err != nil {
fmt.Fprintf(os.Stderr, "Ошибка: %v\n", err)
os.Exit(1)
}
} else {
// Запуск GUI режима (по умолчанию)
if err := gui.Run(); err != nil {
fmt.Fprintf(os.Stderr, "Ошибка: %v\n", err)
os.Exit(1)
}
}
}