Files
EvoFirewall/docs/agents.md
T
DenozordecandCursor ef56da4d91
Build and Push EvoFirewall Docker Image / build-and-push (push) Successful in 1m37s
Build and Push EvoFirewall Docker Image / create-release (push) Skipped
feat(api, web): implement short install link functionality for agents
- Added new API endpoints for creating, retrieving, and revoking install links for agents.
- Enhanced the agent installation process with short links accessible via `/agent-install/:id` and `/:slug`.
- Updated the README and documentation to reflect the new installation method and usage instructions.
- Refactored relevant components in the web application to support the new install link feature.
- Improved error handling and validation for install link operations.

Co-authored-by: Cursor <[email protected]>
2026-07-21 01:25:05 +07:00

1.3 KiB
Raw Blame History

Agents

Short install (рекомендуется)

В UI /agentsДобавить агента создаёт install-ссылку. На хосте:

curl -fsSL https://<cp>/agent-install/<id> | bash
# или короткий slug:
curl -fsSL https://<cp>/<slug> | bash

Скрипт уже содержит EVOFW_CP_URL, EVOFW_SEED, EVOFW_CLIENT_NAME. После enroll одобрите агента во вкладке Pending.

API (auth): POST /api/v1/install-links { "name": "web-01", "platform": "linux" }.

Linux (legacy one-liner)

curl -fsSL https://<cp>/v1/agent/install.sh | \
  EVOFW_CP_URL=https://<cp> \
  EVOFW_SEED=<seed> \
  EVOFW_CLIENT_NAME="web-01" \
  bash

Файлы: /etc/evofw/agent.conf, /usr/local/sbin/evofw-firewall.sh, timer evofw-firewall.timer (default 1min).

Backend auto-detect: nft → ipset → iptables.

Whitelist: nft chain policy drop + allow set. Blacklist: policy accept + deny set.

MikroTik

Скачайте /v1/agent/mikrotik-install.rsc, задайте globals EvofwCpUrl, EvofwSeed, EvofwName, import. Scheduler каждую минуту тянет policy. Настройте filter на address-list EVOFW_DENY / EVOFW_ALLOW.

Force sync

sudo rm -f /var/lib/evofw/last_hash
sudo /usr/local/sbin/evofw-firewall.sh