Добавить install
+88
@@ -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 <API_KEY>`
|
||||
- `Content-Type: application/json`
|
||||
|
||||
Request JSON:
|
||||
|
||||
```json
|
||||
{
|
||||
"email": "user@example.com",
|
||||
"plan": "monthly"
|
||||
}
|
||||
```
|
||||
|
||||
Response JSON:
|
||||
|
||||
```json
|
||||
{
|
||||
"config": "vpn://...."
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user