feat(api): unify policy handling with default action updates
Build and Push EvoFirewall Docker Image / build-and-push (push) Successful in 1m53s
Build and Push EvoFirewall Docker Image / create-release (push) Skipped

- Updated `evofw-firewall.sh` and related scripts to replace `policy_mode` with `default_action`, enhancing clarity and consistency in policy management.
- Adjusted agent routes and evaluation logic to accommodate the new default action structure, ensuring backward compatibility with legacy modes.
- Enhanced tests to validate the new default action behavior and its integration within the agent policy framework.
- Refactored related components in the web interface to align with the updated policy handling, improving user experience and reducing confusion around policy modes.
This commit is contained in:
Denozordec
2026-07-23 10:52:28 +07:00
parent a6eb21a10d
commit 1f7273f38d
30 changed files with 1469 additions and 621 deletions
+12 -5
View File
@@ -7,15 +7,22 @@ EvoFirewall использует EvoBGP как **источник префикс
В UI Settings или `settings` table:
- `evobgp_api_url` — base URL EvoBGP API
- `evobgp_api_token` — API key (viewer+)
- `evobgp_api_token` — API key (viewer+ / `bgp:directories:read`)
При refresh списка:
## Refresh списка
1. `GET {api}/v1/directories/communities/{id}/prefixes` (если доступен)
2. fallback `GET {api}/v1/lookup?q={community_id}`
При refresh списка `evobgp_community`:
1. `GET {api}/v1/communities/{id}/prefixes?limit=5000`
2. Ответ: `{ items: [{ prefix }], prefixes: string[], has_more, next_cursor }`
3. Entries заменяются; generation агентов с правилами на этот list бампится
## Autocomplete в UI
`GET /api/v1/integrations/evobgp/communities` — proxy к EvoBGP `GET /v1/communities?limit=200` (нужны settings выше).
## Список
Создайте IP list type `evobgp_community` с `config.community_id`. Cron / кнопка Refresh обновляет entries и бампит generation агентов.
Создайте IP list type `evobgp_community` с `config.community_id`. Cron / кнопка Refresh обновляет entries.
Firewall-подсистема в EvoBGP **удалена** (hard cutover) — клиенты переустанавливаются на EvoFirewall agents.