docs: добавлены примеры backup файлов для импорта
- Пример wg-easy backup (db.json) - Пример 3x-ui export - Подробная документация по импорту - Инструкции по получению backup файлов - Список импортируемых данных
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"clients": [
|
||||
{
|
||||
"id": 1,
|
||||
"email": "user1@example.com",
|
||||
"enable": true,
|
||||
"expiryTime": 0,
|
||||
"totalGB": 50,
|
||||
"up": 1073741824,
|
||||
"down": 5368709120
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"email": "user2@example.com",
|
||||
"enable": true,
|
||||
"expiryTime": 1735689600000,
|
||||
"totalGB": 100,
|
||||
"up": 536870912,
|
||||
"down": 2147483648
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"email": "user3@example.com",
|
||||
"enable": false,
|
||||
"expiryTime": 0,
|
||||
"totalGB": 0,
|
||||
"up": 0,
|
||||
"down": 0
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"port": 51820,
|
||||
"interface": "wg0",
|
||||
"mtu": 1420
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
# Import Examples
|
||||
|
||||
This directory contains example backup files from different VPN panels that can be imported into Amnezia VPN Panel.
|
||||
|
||||
## wg-easy-backup-example.json
|
||||
|
||||
Example backup file from wg-easy panel (db.json format).
|
||||
|
||||
**Features:**
|
||||
- Contains 3 clients with different configurations
|
||||
- Includes public/private keys and pre-shared keys
|
||||
- Shows enabled and disabled clients
|
||||
- Preserves original IP addresses
|
||||
|
||||
**How to get from wg-easy:**
|
||||
```bash
|
||||
# SSH into your wg-easy server
|
||||
ssh user@your-server
|
||||
|
||||
# Copy the database file
|
||||
docker cp wg-easy:/app/data/db.json ./wg-easy-backup.json
|
||||
```
|
||||
|
||||
## 3x-ui-backup-example.json
|
||||
|
||||
Example export file from 3x-ui panel.
|
||||
|
||||
**Features:**
|
||||
- Contains 3 clients with traffic statistics
|
||||
- Includes expiration dates and traffic limits
|
||||
- Shows enabled and disabled clients
|
||||
- Contains server settings (port, interface, MTU)
|
||||
|
||||
**How to get from 3x-ui:**
|
||||
1. Login to your 3x-ui panel
|
||||
2. Go to Settings
|
||||
3. Click "Export" button
|
||||
4. Save the JSON file
|
||||
|
||||
## Import Process
|
||||
|
||||
1. **Create New Server:**
|
||||
- Go to "Servers" → "Add Server"
|
||||
- Fill in SSH connection details
|
||||
- Check "Import from existing panel"
|
||||
|
||||
2. **Select Panel Type:**
|
||||
- Choose "wg-easy" or "3x-ui"
|
||||
- Upload your backup file
|
||||
|
||||
3. **Deploy:**
|
||||
- Click "Create Server"
|
||||
- Wait for deployment
|
||||
- Clients will be imported automatically
|
||||
|
||||
## What Gets Imported
|
||||
|
||||
### From wg-easy:
|
||||
- ✅ Client names
|
||||
- ✅ Public/private keys
|
||||
- ✅ Pre-shared keys
|
||||
- ✅ IP addresses
|
||||
- ✅ Enabled/disabled status
|
||||
- ✅ Creation timestamps
|
||||
|
||||
### From 3x-ui:
|
||||
- ✅ Client names (from email field)
|
||||
- ✅ Traffic limits (totalGB)
|
||||
- ✅ Expiration dates
|
||||
- ✅ Enabled/disabled status
|
||||
- ⚠️ Keys will be auto-generated (3x-ui doesn't export them)
|
||||
- ⚠️ IP addresses will be auto-assigned
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
**Import fails with "Invalid JSON format":**
|
||||
- Ensure your backup file is valid JSON
|
||||
- Check that it matches the expected format for your panel type
|
||||
|
||||
**Some clients not imported:**
|
||||
- Check import history in the panel
|
||||
- Review error messages for specific clients
|
||||
- Ensure client names are unique
|
||||
|
||||
**Keys not working after import:**
|
||||
- wg-easy imports preserve original keys
|
||||
- 3x-ui imports generate new keys (clients need new configs)
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"clients": [
|
||||
{
|
||||
"name": "John Doe Phone",
|
||||
"enabled": true,
|
||||
"address": "10.8.1.2",
|
||||
"publicKey": "qwerty123456789abcdefghijklmnopqrstuvwxyz=",
|
||||
"privateKey": "privatekey123456789abcdefghijklmnopqrstuvwxyz=",
|
||||
"preSharedKey": "presharedkey123456789abcdefghijklmnopqrstuvwxyz=",
|
||||
"createdAt": "2024-01-15T10:30:00.000Z"
|
||||
},
|
||||
{
|
||||
"name": "Jane Smith Laptop",
|
||||
"enabled": true,
|
||||
"address": "10.8.1.3",
|
||||
"publicKey": "asdfgh987654321zyxwvutsrqponmlkjihgfedcba=",
|
||||
"privateKey": "privatekey987654321zyxwvutsrqponmlkjihgfedcba=",
|
||||
"preSharedKey": "presharedkey987654321zyxwvutsrqponmlkjihgfedcba=",
|
||||
"createdAt": "2024-02-20T15:45:00.000Z"
|
||||
},
|
||||
{
|
||||
"name": "Bob Office PC",
|
||||
"enabled": false,
|
||||
"address": "10.8.1.4",
|
||||
"publicKey": "zxcvbn111222333444555666777888999000aaabbb=",
|
||||
"createdAt": "2024-03-10T08:20:00.000Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user