Обновить README.md
This commit is contained in:
@@ -1,88 +1,88 @@
|
|||||||
# 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`
|
- `API_BASE_URL`
|
||||||
- `API_BUY_PATH`
|
- `API_BUY_PATH`
|
||||||
- `API_KEY`
|
- `API_KEY`
|
||||||
|
|
||||||
Make scripts executable once:
|
Make scripts executable once:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
chmod +x install.sh uninstall.sh reinstall.sh
|
chmod +x install.sh uninstall.sh reinstall.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
One-click commands:
|
One-click commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./install.sh
|
./install.sh
|
||||||
./uninstall.sh
|
./uninstall.sh
|
||||||
./reinstall.sh
|
./reinstall.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
- `install.sh` - build and start panel
|
- `install.sh` - build and start panel
|
||||||
- `uninstall.sh` - stop and remove container(s)
|
- `uninstall.sh` - stop and remove container(s)
|
||||||
- `reinstall.sh` - full restart with rebuild
|
- `reinstall.sh` - full restart with rebuild
|
||||||
|
|
||||||
After install: `http://localhost:8080`
|
After install: `http://localhost:3050`
|
||||||
|
|
||||||
## Run locally without Docker
|
## Run locally without Docker
|
||||||
|
|
||||||
1. Copy env file:
|
1. Copy env file:
|
||||||
- `.env.example` -> `.env`
|
- `.env.example` -> `.env`
|
||||||
2. Set real values:
|
2. Set real values:
|
||||||
- `API_BASE_URL`
|
- `API_BASE_URL`
|
||||||
- `API_BUY_PATH`
|
- `API_BUY_PATH`
|
||||||
- `API_KEY`
|
- `API_KEY`
|
||||||
3. Start:
|
3. Start:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go run .
|
go run .
|
||||||
```
|
```
|
||||||
|
|
||||||
Open: `http://localhost:8080`
|
Open: `http://localhost:8080`
|
||||||
|
|
||||||
## Run in Docker Compose manually
|
## Run in Docker Compose manually
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose up --build
|
docker compose up --build
|
||||||
```
|
```
|
||||||
|
|
||||||
## External API contract expected
|
## External API contract expected
|
||||||
|
|
||||||
POST `${API_BASE_URL}${API_BUY_PATH}`
|
POST `${API_BASE_URL}${API_BUY_PATH}`
|
||||||
|
|
||||||
Headers:
|
Headers:
|
||||||
- `Authorization: Bearer <API_KEY>`
|
- `Authorization: Bearer <API_KEY>`
|
||||||
- `Content-Type: application/json`
|
- `Content-Type: application/json`
|
||||||
|
|
||||||
Request JSON:
|
Request JSON:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"email": "user@example.com",
|
"email": "user@example.com",
|
||||||
"plan": "monthly"
|
"plan": "monthly"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Response JSON:
|
Response JSON:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"config": "vpn://...."
|
"config": "vpn://...."
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user