feat: Add IP ranges management API endpoints and integrate with frontend for viewing and updating IP ranges
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 6m20s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 6m20s
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
# Примеры файлов S3 для Router Lists UI
|
||||
|
||||
Эта папка содержит примеры файлов, которые хранятся в S3 для работы с FilterManager.
|
||||
|
||||
## Структура папок
|
||||
|
||||
```
|
||||
s3/
|
||||
├── domains/ # Файлы доменов и IP
|
||||
│ ├── domains.txt # Основные домены
|
||||
│ ├── domains_comunity.txt # Домены с community
|
||||
│ ├── asns.txt # ASN списки
|
||||
│ └── ips.txt # IP-диапазоны с community
|
||||
├── filter-manager/ # Файлы FilterManager
|
||||
│ ├── simple-filters.json # Фильтры упрощённого режима
|
||||
│ ├── server-filters-*.json # Фильтры для каждого сервера
|
||||
│ └── config-*.txt # Сгенерированные конфигурации MikroTik
|
||||
└── server-configs.json # Список серверов (в корне S3)
|
||||
```
|
||||
|
||||
## Описание файлов
|
||||
|
||||
### `server-configs.json`
|
||||
Список всех серверов в расширенном режиме.
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "server-001",
|
||||
"name": "SWE-HIPHOST",
|
||||
"description": "Шведский сервер для стриминга и игр",
|
||||
"enabled": true,
|
||||
"createdAt": "2024-01-15T10:30:00.000Z"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### `filter-manager/simple-filters.json`
|
||||
Фильтры для упрощённого режима (применяются ко всем серверам).
|
||||
```json
|
||||
[
|
||||
{
|
||||
"community": "65001:100",
|
||||
"gateway": "SWE-HIPHOST",
|
||||
"description": "Шведский сервер для стриминга"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### `filter-manager/server-filters-{serverId}.json`
|
||||
Фильтры для конкретного сервера в расширенном режиме.
|
||||
```json
|
||||
[
|
||||
{
|
||||
"community": "65001:100",
|
||||
"gateway": "SWE-HIPHOST",
|
||||
"description": "Стриминг сервисы"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### `domains/ips.txt`
|
||||
IP-диапазоны с community для маршрутизации.
|
||||
```
|
||||
192.168.1.0/24 65001:100
|
||||
10.0.0.0/8 65001:200
|
||||
172.16.0.0/12 65001:300
|
||||
8.8.8.0/24 65001:400
|
||||
```
|
||||
|
||||
### `filter-manager/config-{serverId}.txt`
|
||||
Сгенерированная конфигурация MikroTik для конкретного сервера.
|
||||
```
|
||||
// Frouting filter configuration for MikroTik 7.14+
|
||||
// Generated automatically
|
||||
// Date: 2024-01-20T12:00:00.000Z
|
||||
|
||||
if (
|
||||
(bgp-communities includes 65001:100)
|
||||
or
|
||||
(bgp-communities includes 65001:101)
|
||||
)
|
||||
{
|
||||
set gw SWE-HIPHOST; accept;
|
||||
}
|
||||
else
|
||||
{
|
||||
reject;
|
||||
}
|
||||
```
|
||||
|
||||
## Примеры серверов
|
||||
|
||||
1. **SWE-HIPHOST** (server-001) - Шведский сервер для стриминга
|
||||
2. **NL-AMSTERDAM** (server-002) - Голландский сервер с низкой задержкой
|
||||
3. **DE-FRANKFURT** (server-003) - Немецкий сервер для торрентов (отключен)
|
||||
4. **US-NEWYORK** (server-004) - Американский сервер для Netflix (с каскадной структурой)
|
||||
5. **JP-TOKYO** (server-005) - Японский сервер для аниме и игр
|
||||
|
||||
## Особенности
|
||||
|
||||
- **Каскадная структура**: Сервер US-NEWYORK демонстрирует конфигурацию с несколькими gateway
|
||||
- **Отключённые серверы**: DE-FRANKFURT показывает неактивный сервер
|
||||
- **Разные типы трафика**: Каждый сервер специализируется на определённом типе контента
|
||||
- **Реалистичные community**: Используются AS:community в формате 65001:XXX
|
||||
|
||||
## Использование
|
||||
|
||||
Эти файлы можно использовать для:
|
||||
- Тестирования FilterManager
|
||||
- Демонстрации функциональности
|
||||
- Обучения работе с системой
|
||||
- Восстановления данных после сбоя
|
||||
@@ -0,0 +1,8 @@
|
||||
192.168.1.0/24 65001:100
|
||||
10.0.0.0/8 65001:200
|
||||
172.16.0.0/12 65001:300
|
||||
8.8.8.0/24 65001:400
|
||||
1.1.1.0/24 65001:500
|
||||
208.67.222.0/24 65001:600
|
||||
9.9.9.0/24 65001:700
|
||||
149.112.112.0/24 65001:800
|
||||
@@ -0,0 +1,18 @@
|
||||
// Frouting filter configuration for MikroTik 7.14+
|
||||
// Generated automatically
|
||||
// Date: 2024-01-20T12:00:00.000Z
|
||||
|
||||
if (
|
||||
(bgp-communities includes 65001:100)
|
||||
or
|
||||
(bgp-communities includes 65001:101)
|
||||
or
|
||||
(bgp-communities includes 65001:102)
|
||||
)
|
||||
{
|
||||
set gw SWE-HIPHOST; accept;
|
||||
}
|
||||
else
|
||||
{
|
||||
reject;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// Frouting filter configuration for MikroTik 7.14+
|
||||
// Generated automatically
|
||||
// Date: 2024-01-20T12:00:00.000Z
|
||||
|
||||
if (
|
||||
(bgp-communities includes 65001:200)
|
||||
or
|
||||
(bgp-communities includes 65001:201)
|
||||
or
|
||||
(bgp-communities includes 65001:202)
|
||||
or
|
||||
(bgp-communities includes 65001:203)
|
||||
)
|
||||
{
|
||||
set gw NL-AMSTERDAM; accept;
|
||||
}
|
||||
else
|
||||
{
|
||||
reject;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// Frouting filter configuration for MikroTik 7.14+
|
||||
// Generated automatically
|
||||
// Date: 2024-01-20T12:00:00.000Z
|
||||
|
||||
if (
|
||||
(bgp-communities includes 65001:400)
|
||||
or
|
||||
(bgp-communities includes 65001:401)
|
||||
)
|
||||
{
|
||||
set gw US-NEWYORK; accept;
|
||||
}
|
||||
else if (
|
||||
(bgp-communities includes 65001:402)
|
||||
or
|
||||
(bgp-communities includes 65001:403)
|
||||
)
|
||||
{
|
||||
set gw US-LOSANGELES; accept;
|
||||
}
|
||||
else if (
|
||||
(bgp-communities includes 65001:404)
|
||||
)
|
||||
{
|
||||
set gw US-CHICAGO; accept;
|
||||
}
|
||||
else
|
||||
{
|
||||
reject;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// Frouting filter configuration for MikroTik 7.14+
|
||||
// Generated automatically
|
||||
// Date: 2024-01-20T12:00:00.000Z
|
||||
|
||||
if (
|
||||
(bgp-communities includes 65001:500)
|
||||
or
|
||||
(bgp-communities includes 65001:501)
|
||||
or
|
||||
(bgp-communities includes 65001:502)
|
||||
or
|
||||
(bgp-communities includes 65001:503)
|
||||
)
|
||||
{
|
||||
set gw JP-TOKYO; accept;
|
||||
}
|
||||
else
|
||||
{
|
||||
reject;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
[
|
||||
{
|
||||
"community": "65001:100",
|
||||
"gateway": "SWE-HIPHOST",
|
||||
"description": "Стриминг сервисы"
|
||||
},
|
||||
{
|
||||
"community": "65001:101",
|
||||
"gateway": "SWE-HIPHOST",
|
||||
"description": "Игровые серверы"
|
||||
},
|
||||
{
|
||||
"community": "65001:102",
|
||||
"gateway": "SWE-HIPHOST",
|
||||
"description": "Социальные сети"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,22 @@
|
||||
[
|
||||
{
|
||||
"community": "65001:200",
|
||||
"gateway": "NL-AMSTERDAM",
|
||||
"description": "Игровые платформы"
|
||||
},
|
||||
{
|
||||
"community": "65001:201",
|
||||
"gateway": "NL-AMSTERDAM",
|
||||
"description": "VoIP сервисы"
|
||||
},
|
||||
{
|
||||
"community": "65001:202",
|
||||
"gateway": "NL-AMSTERDAM",
|
||||
"description": "Облачные сервисы"
|
||||
},
|
||||
{
|
||||
"community": "65001:203",
|
||||
"gateway": "NL-AMSTERDAM",
|
||||
"description": "CDN сети"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,17 @@
|
||||
[
|
||||
{
|
||||
"community": "65001:300",
|
||||
"gateway": "DE-FRANKFURT",
|
||||
"description": "Торрент трекеры"
|
||||
},
|
||||
{
|
||||
"community": "65001:301",
|
||||
"gateway": "DE-FRANKFURT",
|
||||
"description": "Файлообменники"
|
||||
},
|
||||
{
|
||||
"community": "65001:302",
|
||||
"gateway": "DE-FRANKFURT",
|
||||
"description": "P2P сети"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"community": "65001:400",
|
||||
"gateway": "US-NEWYORK",
|
||||
"description": "Netflix US"
|
||||
},
|
||||
{
|
||||
"community": "65001:401",
|
||||
"gateway": "US-NEWYORK",
|
||||
"description": "Hulu US"
|
||||
},
|
||||
{
|
||||
"community": "65001:402",
|
||||
"gateway": "US-LOSANGELES",
|
||||
"description": "Disney+ US"
|
||||
},
|
||||
{
|
||||
"community": "65001:403",
|
||||
"gateway": "US-LOSANGELES",
|
||||
"description": "HBO Max US"
|
||||
},
|
||||
{
|
||||
"community": "65001:404",
|
||||
"gateway": "US-CHICAGO",
|
||||
"description": "Amazon Prime US"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,22 @@
|
||||
[
|
||||
{
|
||||
"community": "65001:500",
|
||||
"gateway": "JP-TOKYO",
|
||||
"description": "Crunchyroll"
|
||||
},
|
||||
{
|
||||
"community": "65001:501",
|
||||
"gateway": "JP-TOKYO",
|
||||
"description": "Funimation"
|
||||
},
|
||||
{
|
||||
"community": "65001:502",
|
||||
"gateway": "JP-TOKYO",
|
||||
"description": "Steam JP"
|
||||
},
|
||||
{
|
||||
"community": "65001:503",
|
||||
"gateway": "JP-TOKYO",
|
||||
"description": "Nintendo Online"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"community": "65001:100",
|
||||
"gateway": "SWE-HIPHOST",
|
||||
"description": "Шведский сервер для стриминга"
|
||||
},
|
||||
{
|
||||
"community": "65001:200",
|
||||
"gateway": "NL-AMSTERDAM",
|
||||
"description": "Голландский сервер для игр"
|
||||
},
|
||||
{
|
||||
"community": "65001:300",
|
||||
"gateway": "DE-FRANKFURT",
|
||||
"description": "Немецкий сервер для торрентов"
|
||||
},
|
||||
{
|
||||
"community": "65001:400",
|
||||
"gateway": "US-NEWYORK",
|
||||
"description": "Американский сервер для Netflix"
|
||||
},
|
||||
{
|
||||
"community": "65001:500",
|
||||
"gateway": "JP-TOKYO",
|
||||
"description": "Японский сервер для аниме"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
"id": "server-001",
|
||||
"name": "SWE-HIPHOST",
|
||||
"description": "Шведский сервер для стриминга и игр",
|
||||
"enabled": true,
|
||||
"createdAt": "2024-01-15T10:30:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "server-002",
|
||||
"name": "NL-AMSTERDAM",
|
||||
"description": "Голландский сервер с низкой задержкой",
|
||||
"enabled": true,
|
||||
"createdAt": "2024-01-16T14:20:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "server-003",
|
||||
"name": "DE-FRANKFURT",
|
||||
"description": "Немецкий сервер для торрентов",
|
||||
"enabled": false,
|
||||
"createdAt": "2024-01-17T09:15:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "server-004",
|
||||
"name": "US-NEWYORK",
|
||||
"description": "Американский сервер для Netflix",
|
||||
"enabled": true,
|
||||
"createdAt": "2024-01-18T16:45:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "server-005",
|
||||
"name": "JP-TOKYO",
|
||||
"description": "Японский сервер для аниме и игр",
|
||||
"enabled": true,
|
||||
"createdAt": "2024-01-19T11:30:00.000Z"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user