10. Notifications¶
Tip
Webhooks are signed with X-Vortex-Signature: sha256=... — set the secret in env.
Event Bus¶
All domain events flow through the internal bus:
| Event | When |
|---|---|
user.created |
User created |
user.deleted |
User deleted |
user.limited |
Traffic cap exceeded |
user.expired |
Expired |
user.reset |
Traffic reset |
user.ip_limit |
Account sharing |
user.expiry_warning |
3 days before expiry |
node.down |
Node unreachable |
node.up |
Node recovered |
Webhook¶
Payload¶
{
"type": "user.limited",
"time": "2026-06-17T12:00:00Z",
"user_id": "uuid",
"username": "john",
"message": "User john exceeded data limit"
}
Signature¶
Header: X-Vortex-Signature: sha256=<hex>
Telegram Notifier¶
Events are sent to the admin chat.
Telegram Bot (Interactive — Admin)¶
Bot with long-polling:
| Command | Action |
|---|---|
/status |
Node status |
/users |
User stats |
/node <name> |
Node details |
/limit <user> |
Limit user |
Telegram User Bot¶
End users authenticate with subscription token:
| Command | Action |
|---|---|
/start |
Help |
/login <token> |
Link account |
/usage |
Current usage |
/sub |
Subscription link |
Auto-Backup to Telegram/S3¶
Settings → Auto Backup
- Schedule (cron-like)
- Destination: Telegram document or S3 bucket
- File: JSON transactional backup
SSE (UI)¶
In addition to webhooks, the UI subscribes to the same bus via SSE — toasts and automatic refresh.