mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6682] [CLOSED] Route Telegram bot traffic via a selectable routing inbound tag #6407
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6407
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6682
Author: @freeb5d
Created: 9/29/2026
Status: ❌ Closed
Base:
main← Head:feat/telegram-bot-routing📝 Commits (3)
b0539d6Route Telegram bot traffic through a selectable routing inbound tag85f671fHandle string-form inboundTag, skip egress lookup when bot bridge exists, add tests47c268bCache the panel egress lookup in the bot dialer📊 Changes
6 files changed (+161 additions, -9 deletions)
View changed files
📝
frontend/src/pages/xray/routing/RoutingTab.tsx(+2 -0)📝
internal/web/controller/xray_setting.go(+8 -0)📝
internal/web/service/setting.go(+19 -0)📝
internal/web/service/tgbot/tgbot.go(+27 -9)📝
internal/web/service/xray.go(+67 -0)📝
internal/web/service/xray_config_inject_test.go(+38 -0)📄 Description
Problem
On servers where Telegram is filtered (e.g. hosts in Iran), the Telegram bot cannot reach the Telegram API, and the only workaround is a dedicated proxy setting.
Change
telegram-botentry to Routing -> Inbound tags.telegram-botbridge, then the panel-egress bridge, then direct. No bot restart is needed when Xray starts later or a rule is added.Testing
Not fully tested. The changed Go files are gofmt-clean, but the full build could not run in my environment (no C compiler for the SQLite driver) and I have not run the frontend build or tried it against a filtered server. Please verify: add a rule with Inbound tag
telegram-botand an outbound, restart Xray, then use the Telegram test in settings.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.