commit c10a1dcda7f0029ccb588da822c9579a450e0154 Author: admin Date: Thu Apr 23 06:28:47 2026 +0000 Загрузить файлы в «/» diff --git a/README.md b/README.md new file mode 100644 index 0000000..5e04d9a --- /dev/null +++ b/README.md @@ -0,0 +1,88 @@ +# RemnaWave VPN Panel (Go) + +MVP panel on Go with: +- main page +- registration +- authorization +- personal cabinet +- VPN config purchase via real external API and permanent key + +## One-click install/uninstall/reinstall (Ubuntu) + +Requirements: +- Docker Engine + Docker Compose plugin installed +- `bash` available (default on Ubuntu) + +First setup: +1. Copy `.env.example` to `.env` +2. Fill real values in `.env`: + - `API_BASE_URL` + - `API_BUY_PATH` + - `API_KEY` + +Make scripts executable once: + +```bash +chmod +x install.sh uninstall.sh reinstall.sh +``` + +One-click commands: + +```bash +./install.sh +./uninstall.sh +./reinstall.sh +``` + +- `install.sh` - build and start panel +- `uninstall.sh` - stop and remove container(s) +- `reinstall.sh` - full restart with rebuild + +After install: `http://localhost:8080` + +## Run locally without Docker + +1. Copy env file: + - `.env.example` -> `.env` +2. Set real values: + - `API_BASE_URL` + - `API_BUY_PATH` + - `API_KEY` +3. Start: + +```bash +go run . +``` + +Open: `http://localhost:8080` + +## Run in Docker Compose manually + +```bash +docker compose up --build +``` + +## External API contract expected + +POST `${API_BASE_URL}${API_BUY_PATH}` + +Headers: +- `Authorization: Bearer ` +- `Content-Type: application/json` + +Request JSON: + +```json +{ + "email": "user@example.com", + "plan": "monthly" +} +``` + +Response JSON: + +```json +{ + "config": "vpn://...." +} +```