Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3c729c08ff | |||
| b561412102 | |||
| d84f1a93bf |
@@ -1,88 +1,128 @@
|
||||
# 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 <API_KEY>`
|
||||
- `Content-Type: application/json`
|
||||
|
||||
Request JSON:
|
||||
|
||||
```json
|
||||
{
|
||||
"email": "user@example.com",
|
||||
"plan": "monthly"
|
||||
}
|
||||
```
|
||||
|
||||
Response JSON:
|
||||
|
||||
```json
|
||||
{
|
||||
"config": "vpn://...."
|
||||
}
|
||||
```
|
||||
# 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`:
|
||||
- `POSTGRES_DB`
|
||||
- `POSTGRES_USER`
|
||||
- `POSTGRES_PASSWORD`
|
||||
- `DATABASE_URL`
|
||||
- `API_BASE_URL`
|
||||
- `API_BUY_PATH`
|
||||
- `API_KEY`
|
||||
- `ADMIN_EMAIL`
|
||||
- `ADMIN_PASSWORD`
|
||||
|
||||
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
|
||||
|
||||
If you see `/usr/bin/env: 'bash\r': No such file or directory`, convert line endings:
|
||||
|
||||
```bash
|
||||
sed -i 's/\r$//' install.sh uninstall.sh reinstall.sh
|
||||
chmod +x install.sh uninstall.sh reinstall.sh
|
||||
```
|
||||
|
||||
After install: `http://localhost:3050`
|
||||
|
||||
## Run locally without Docker
|
||||
|
||||
1. Copy env file:
|
||||
- `.env.example` -> `.env`
|
||||
2. Set real values:
|
||||
- `DATABASE_URL` (example: `postgres://postgres:postgres@localhost:5432/remnawave?sslmode=disable`)
|
||||
- `API_BASE_URL`
|
||||
- `API_BUY_PATH`
|
||||
- `API_KEY`
|
||||
- `ADMIN_EMAIL`
|
||||
- `ADMIN_PASSWORD`
|
||||
3. Start:
|
||||
|
||||
```bash
|
||||
go run .
|
||||
```
|
||||
|
||||
Open: `http://localhost:3050`
|
||||
|
||||
## Run in Docker Compose manually
|
||||
|
||||
```bash
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
## Database (PostgreSQL 17)
|
||||
|
||||
- PostgreSQL 17 runs as `postgres` service in `docker-compose.yml`
|
||||
- App uses `DATABASE_URL` to connect
|
||||
- Tables are auto-created on startup:
|
||||
- `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
@@ -1,55 +1,90 @@
|
||||
# Releases
|
||||
|
||||
## v0.3.0 - Ubuntu one-click lifecycle
|
||||
|
||||
### Added
|
||||
- Ubuntu scripts for full lifecycle:
|
||||
- `install.sh` (build + start)
|
||||
- `uninstall.sh` (stop + remove containers, optional image cleanup)
|
||||
- `reinstall.sh` (rebuild + restart)
|
||||
|
||||
### Changed
|
||||
- `README.md` updated from Windows flow to Ubuntu flow.
|
||||
- Added executable step for scripts:
|
||||
- `chmod +x install.sh uninstall.sh reinstall.sh`
|
||||
|
||||
### Removed
|
||||
- Windows-specific scripts removed:
|
||||
- `install.bat`, `uninstall.bat`, `reinstall.bat`
|
||||
- `install.ps1`, `uninstall.ps1`, `reinstall.ps1`
|
||||
|
||||
---
|
||||
|
||||
## 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`
|
||||
# Releases
|
||||
|
||||
## v0.5.0 - PostgreSQL 17 integration
|
||||
|
||||
### Added
|
||||
- PostgreSQL 17 service in `docker-compose.yml`.
|
||||
- Persistent volume `remnawave_pgdata`.
|
||||
- DB env variables in `.env.example`:
|
||||
- `POSTGRES_DB`
|
||||
- `POSTGRES_USER`
|
||||
- `POSTGRES_PASSWORD`
|
||||
- `DATABASE_URL`
|
||||
|
||||
### Changed
|
||||
- Application storage migrated from in-memory to PostgreSQL for:
|
||||
- users
|
||||
- purchases
|
||||
- admin servers
|
||||
- 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.4.0 - Default port changed to 3050
|
||||
|
||||
### Changed
|
||||
- Application default bind port changed from `8080` to `3050`.
|
||||
- Docker and docs updated to use `3050`:
|
||||
- `main.go` default `APP_ADDR` -> `:3050`
|
||||
- `docker-compose.yml` port mapping -> `3050:3050`
|
||||
- `Dockerfile` `EXPOSE 3050`
|
||||
- `install.sh`/`reinstall.sh` URL output -> `http://localhost:3050`
|
||||
- `README.md` URLs updated to `http://localhost:3050`
|
||||
|
||||
---
|
||||
|
||||
## v0.3.0 - Ubuntu one-click lifecycle
|
||||
|
||||
### Added
|
||||
- Ubuntu scripts for full lifecycle:
|
||||
- `install.sh` (build + start)
|
||||
- `uninstall.sh` (stop + remove containers, optional image cleanup)
|
||||
- `reinstall.sh` (rebuild + restart)
|
||||
|
||||
### Changed
|
||||
- `README.md` updated from Windows flow to Ubuntu flow.
|
||||
- Added executable step for scripts:
|
||||
- `chmod +x install.sh uninstall.sh reinstall.sh`
|
||||
|
||||
### Removed
|
||||
- Windows-specific scripts removed:
|
||||
- `install.bat`, `uninstall.bat`, `reinstall.bat`
|
||||
- `install.ps1`, `uninstall.ps1`, `reinstall.ps1`
|
||||
|
||||
---
|
||||
|
||||
## 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`
|
||||
|
||||
Reference in New Issue
Block a user