[GH-ISSUE #5727] [Feature]: Supports third-party webhooks #3986

Open
opened 2026-10-31 20:36:21 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Cudaaa on GitHub (Jul 2, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5727

In some areas or situations, Telegram isn't suitable (network/local regulations, etc.)

Describe the solution you'd like

Open support for third-party webhooks,Expanding on that, it can automatically push some new notifications, like new subscriptions, online alerts, traffic usage, and so on;Use a third-party webhook API, make a POST request, to achieve the push effect

Alternatives you've considered

No response

Concrete use case

No response

Mockups, screenshots, or examples

Image

Which parts of the panel would this affect?

Telegram bot, Subscription (share links / Clash / JSON)

Are you willing to help?

  • I'd like to implement this feature myself and open a PR.
  • I can help test once a PR is open.

Before submitting

  • I searched existing issues and this feature has not been requested.
  • This feature request is written in English.
Originally created by @Cudaaa on GitHub (Jul 2, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5727 ### Is your feature request related to a problem? In some areas or situations, Telegram isn't suitable (network/local regulations, etc.) ### Describe the solution you'd like Open support for third-party webhooks,Expanding on that, it can automatically push some new notifications, like new subscriptions, online alerts, traffic usage, and so on;Use a third-party webhook API, make a POST request, to achieve the push effect ### Alternatives you've considered _No response_ ### Concrete use case _No response_ ### Mockups, screenshots, or examples <img width="1492" height="1178" alt="Image" src="https://github.com/user-attachments/assets/ee29e526-1a37-45ee-b831-b34f76268d08" /> ### Which parts of the panel would this affect? Telegram bot, Subscription (share links / Clash / JSON) ### Are you willing to help? - [ ] I'd like to implement this feature myself and open a PR. - [x] I can help test once a PR is open. ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this feature has not been requested. - [x] This feature request is written in English.
Author
Owner

@github-actions[bot] commented on GitHub (Jul 2, 2026):

Confirmed: 3x-ui has no generic third-party webhook / push-notification mechanism today. The only hit for "webhook" in the codebase (frontend/src/schemas/routing.ts, RuleWebhookSchema) is Xray-core's routing-rule failover webhook, unrelated to panel notifications.

Current notification pipeline is Telegram-only:

  • internal/eventbus/events.go defines the event types (outbound.up/down, xray.crash, node.up/down, cpu.high, memory.high, login.attempt). There is no "new subscription" event today.
  • The only subscriber is the Telegram bot: internal/web/service/tgbot/tgbot_event.go (HandleEvent → formatEventMessage → SendMsgToTgbotAdmins), gated per-event by SettingService.GetTgEnabledEvents/SetTgEnabledEvents (internal/web/service/setting.go:996).
  • Periodic reports (traffic/exhausted clients, server usage, backups) are generated in internal/web/service/tgbot/tgbot_report.go and likewise sent only via the Telegram Bot API (telego), not through any generic HTTP dispatcher.

So adding third-party webhook push would require a new event sink (an HTTP POST notifier subscribing to the event bus alongside the Telegram bot), plus settings/UI to configure the target URL(s)/secret and which events to forward, and — for "new subscription" specifically — a new event type, since none currently fires on subscription access.

For context: this has been requested before in #961 and #2837, but both were closed on 2026-05-29 with no comment as part of a bulk issue cleanup, not because the feature was implemented — there is no webhook dispatcher in the current source. This request is still valid and not a duplicate of resolved work.

This reply was generated automatically by an AI agent. A maintainer may follow up.

<!-- gh-comment-id:4863009238 --> @github-actions[bot] commented on GitHub (Jul 2, 2026): Confirmed: 3x-ui has no generic third-party webhook / push-notification mechanism today. The only hit for "webhook" in the codebase (`frontend/src/schemas/routing.ts`, `RuleWebhookSchema`) is Xray-core's routing-rule failover webhook, unrelated to panel notifications. Current notification pipeline is Telegram-only: - `internal/eventbus/events.go` defines the event types (`outbound.up/down`, `xray.crash`, `node.up/down`, `cpu.high`, `memory.high`, `login.attempt`). There is no "new subscription" event today. - The only subscriber is the Telegram bot: `internal/web/service/tgbot/tgbot_event.go` (`HandleEvent` → `formatEventMessage` → `SendMsgToTgbotAdmins`), gated per-event by `SettingService.GetTgEnabledEvents`/`SetTgEnabledEvents` (`internal/web/service/setting.go:996`). - Periodic reports (traffic/exhausted clients, server usage, backups) are generated in `internal/web/service/tgbot/tgbot_report.go` and likewise sent only via the Telegram Bot API (`telego`), not through any generic HTTP dispatcher. So adding third-party webhook push would require a new event sink (an HTTP POST notifier subscribing to the event bus alongside the Telegram bot), plus settings/UI to configure the target URL(s)/secret and which events to forward, and — for "new subscription" specifically — a new event type, since none currently fires on subscription access. For context: this has been requested before in #961 and #2837, but both were closed on 2026-05-29 with no comment as part of a bulk issue cleanup, not because the feature was implemented — there is no webhook dispatcher in the current source. This request is still valid and not a duplicate of resolved work. *This reply was generated automatically by an AI agent. A maintainer may follow up.*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#3986
No description provided.