3 Commits

Author SHA1 Message Date
admin 3c729c08ff Обновить RELEASES.md 2026-04-23 06:59:43 +00:00
admin b561412102 Обновить README.md 2026-04-23 06:58:54 +00:00
admin d84f1a93bf Обновить README.md 2026-04-23 06:48:33 +00:00
2 changed files with 218 additions and 143 deletions
+128 -88
View File
@@ -1,88 +1,128 @@
# RemnaWave VPN Panel (Go) # RemnaWave VPN Panel (Go)
MVP panel on Go with: MVP panel on Go with:
- main page - main page
- registration - registration
- authorization - authorization
- personal cabinet - personal cabinet
- VPN config purchase via real external API and permanent key - VPN config purchase via real external API and permanent key
## One-click install/uninstall/reinstall (Ubuntu) ## One-click install/uninstall/reinstall (Ubuntu)
Requirements: Requirements:
- Docker Engine + Docker Compose plugin installed - Docker Engine + Docker Compose plugin installed
- `bash` available (default on Ubuntu) - `bash` available (default on Ubuntu)
First setup: First setup:
1. Copy `.env.example` to `.env` 1. Copy `.env.example` to `.env`
2. Fill real values in `.env`: 2. Fill real values in `.env`:
- `API_BASE_URL` - `POSTGRES_DB`
- `API_BUY_PATH` - `POSTGRES_USER`
- `API_KEY` - `POSTGRES_PASSWORD`
- `DATABASE_URL`
Make scripts executable once: - `API_BASE_URL`
- `API_BUY_PATH`
```bash - `API_KEY`
chmod +x install.sh uninstall.sh reinstall.sh - `ADMIN_EMAIL`
``` - `ADMIN_PASSWORD`
One-click commands: Make scripts executable once:
```bash ```bash
./install.sh chmod +x install.sh uninstall.sh reinstall.sh
./uninstall.sh ```
./reinstall.sh
``` One-click commands:
- `install.sh` - build and start panel ```bash
- `uninstall.sh` - stop and remove container(s) ./install.sh
- `reinstall.sh` - full restart with rebuild ./uninstall.sh
./reinstall.sh
After install: `http://localhost:8080` ```
## Run locally without Docker - `install.sh` - build and start panel
- `uninstall.sh` - stop and remove container(s)
1. Copy env file: - `reinstall.sh` - full restart with rebuild
- `.env.example` -> `.env`
2. Set real values: If you see `/usr/bin/env: 'bash\r': No such file or directory`, convert line endings:
- `API_BASE_URL`
- `API_BUY_PATH` ```bash
- `API_KEY` sed -i 's/\r$//' install.sh uninstall.sh reinstall.sh
3. Start: chmod +x install.sh uninstall.sh reinstall.sh
```
```bash
go run . After install: `http://localhost:3050`
```
## Run locally without Docker
Open: `http://localhost:8080`
1. Copy env file:
## Run in Docker Compose manually - `.env.example` -> `.env`
2. Set real values:
```bash - `DATABASE_URL` (example: `postgres://postgres:postgres@localhost:5432/remnawave?sslmode=disable`)
docker compose up --build - `API_BASE_URL`
``` - `API_BUY_PATH`
- `API_KEY`
## External API contract expected - `ADMIN_EMAIL`
- `ADMIN_PASSWORD`
POST `${API_BASE_URL}${API_BUY_PATH}` 3. Start:
Headers: ```bash
- `Authorization: Bearer <API_KEY>` go run .
- `Content-Type: application/json` ```
Request JSON: Open: `http://localhost:3050`
```json ## Run in Docker Compose manually
{
"email": "user@example.com", ```bash
"plan": "monthly" docker compose up --build
} ```
```
## Database (PostgreSQL 17)
Response JSON:
- PostgreSQL 17 runs as `postgres` service in `docker-compose.yml`
```json - App uses `DATABASE_URL` to connect
{ - Tables are auto-created on startup:
"config": "vpn://...." - `users`
} - `purchases`
``` - `servers`
- Admin user is auto-created/updated from:
- `ADMIN_EMAIL`
- `ADMIN_PASSWORD`
## External API contract expected
POST `${API_BASE_URL}${API_BUY_PATH}`
Headers:
- `Authorization: Bearer <API_KEY>`
- `Content-Type: application/json`
Request JSON:
```json
{
"email": "user@example.com",
"plan": "monthly"
}
```
## Roles and admin panel
- Default registered users get role: `user`
- Built-in administrator is created from env:
- `ADMIN_EMAIL`
- `ADMIN_PASSWORD`
- Admin panel URL: `/admin`
- Admin features:
- Add VPN servers
- Toggle server status online/offline
- Delete servers
Response JSON:
```json
{
"config": "vpn://...."
}
```
+90 -55
View File
@@ -1,55 +1,90 @@
# Releases # Releases
## v0.3.0 - Ubuntu one-click lifecycle ## v0.5.0 - PostgreSQL 17 integration
### Added ### Added
- Ubuntu scripts for full lifecycle: - PostgreSQL 17 service in `docker-compose.yml`.
- `install.sh` (build + start) - Persistent volume `remnawave_pgdata`.
- `uninstall.sh` (stop + remove containers, optional image cleanup) - DB env variables in `.env.example`:
- `reinstall.sh` (rebuild + restart) - `POSTGRES_DB`
- `POSTGRES_USER`
### Changed - `POSTGRES_PASSWORD`
- `README.md` updated from Windows flow to Ubuntu flow. - `DATABASE_URL`
- Added executable step for scripts:
- `chmod +x install.sh uninstall.sh reinstall.sh` ### Changed
- Application storage migrated from in-memory to PostgreSQL for:
### Removed - users
- Windows-specific scripts removed: - purchases
- `install.bat`, `uninstall.bat`, `reinstall.bat` - admin servers
- `install.ps1`, `uninstall.ps1`, `reinstall.ps1` - Auto DB initialization on startup (`CREATE TABLE IF NOT EXISTS`).
- Admin user is upserted from `ADMIN_EMAIL`/`ADMIN_PASSWORD` at startup.
--- - Documentation updated with PostgreSQL section.
## v0.2.0 - One-click automation (initial) ---
### Added ## v0.4.0 - Default port changed to 3050
- Initial one-click lifecycle scripts (first implementation).
- Documentation for install/uninstall/reinstall workflow. ### Changed
- Application default bind port changed from `8080` to `3050`.
--- - Docker and docs updated to use `3050`:
- `main.go` default `APP_ADDR` -> `:3050`
## v0.1.0 - MVP RemnaWave VPN Panel - `docker-compose.yml` port mapping -> `3050:3050`
- `Dockerfile` `EXPOSE 3050`
### Added - `install.sh`/`reinstall.sh` URL output -> `http://localhost:3050`
- Go web app with routes: - `README.md` URLs updated to `http://localhost:3050`
- `/` home page
- `/register` registration ---
- `/login` authorization
- `/logout` sign out ## v0.3.0 - Ubuntu one-click lifecycle
- `/cabinet` personal cabinet
- `/buy` VPN config purchase ### Added
- Session auth via HTTP-only cookie token. - Ubuntu scripts for full lifecycle:
- In-memory users and purchases storage for MVP. - `install.sh` (build + start)
- Purchase integration with real external API using env key: - `uninstall.sh` (stop + remove containers, optional image cleanup)
- `API_BASE_URL` - `reinstall.sh` (rebuild + restart)
- `API_BUY_PATH`
- `API_KEY` ### Changed
- Docker support: - `README.md` updated from Windows flow to Ubuntu flow.
- `Dockerfile` - Added executable step for scripts:
- `docker-compose.yml` - `chmod +x install.sh uninstall.sh reinstall.sh`
- UI templates and styles:
- `templates/*.html` ### Removed
- `static/styles.css` - Windows-specific scripts removed:
- Setup docs: - `install.bat`, `uninstall.bat`, `reinstall.bat`
- `.env.example` - `install.ps1`, `uninstall.ps1`, `reinstall.ps1`
- `README.md`
---
## v0.2.0 - One-click automation (initial)
### Added
- Initial one-click lifecycle scripts (first implementation).
- Documentation for install/uninstall/reinstall workflow.
---
## v0.1.0 - MVP RemnaWave VPN Panel
### Added
- Go web app with routes:
- `/` home page
- `/register` registration
- `/login` authorization
- `/logout` sign out
- `/cabinet` personal cabinet
- `/buy` VPN config purchase
- Session auth via HTTP-only cookie token.
- In-memory users and purchases storage for MVP.
- Purchase integration with real external API using env key:
- `API_BASE_URL`
- `API_BUY_PATH`
- `API_KEY`
- Docker support:
- `Dockerfile`
- `docker-compose.yml`
- UI templates and styles:
- `templates/*.html`
- `static/styles.css`
- Setup docs:
- `.env.example`
- `README.md`