Files
panel-vpn/README.md
T
orohiandCursor 23101e355c first commit
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 03:46:42 +03:00

52 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# VPN Panel
Админ-панель VPN на Go + PostgreSQL 17. Готово к деплою в **Dokploy** через Docker Compose.
## Стек
- Go 1.23 (веб-админка)
- PostgreSQL 17
- Docker Compose
## Быстрый старт (Dokploy / Docker)
1. Скопируйте `.env.example``.env` и задайте пароли.
2. В Dokploy создайте приложение типа **Docker Compose**, укажите этот репозиторий.
3. Deploy — поднимутся сервисы `app` и `postgres`.
```bash
docker compose up -d --build
```
Панель: `http://localhost:8080`
## Авторизация админа (из `.env`)
| Переменная | Значение по умолчанию |
|---|---|
| `ADMIN_EMAIL` | `admin@panel.local` |
| `ADMIN_PASSWORD` | `Admin123!ChangeMe` |
| `ADMIN_NAME` | `Administrator` |
При первом запуске админ создаётся автоматически из этих переменных.
## Протоколы (seed)
WireGuard, OpenVPN, VLESS, VMess, Trojan, Shadowsocks, Hysteria2 — можно включать/выключать в админке.
## Локальная разработка без Docker
```bash
# нужен локальный Postgres 17 и .env с POSTGRES_HOST=localhost
go mod tidy
go run ./cmd/server
```
## Эндпоинты
- `/` — главная
- `/login` — вход
- `/admin` — дашборд
- `/admin/protocols` — протоколы
- `/health` — healthcheck