[PR #4327] [CLOSED] Feature/tgbot new client creation params #5662

Closed
opened 2026-11-02 04:03:08 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/4327
Author: @rydve
Created: 5/12/2026
Status: ❌ Closed

Base: main ← Head: feature/tgbot-new-client-creation-params


📝 Commits (10+)

  • 510db89 feat(tgbot): add Sub ID and Flow (for VLESS with TCP(raw) and Reality/TLS) selection in client-creation menu.
  • ee92032 Update web/service/tgbot.go
  • 9b494e0 Merge branch 'MHSanaei:main' into feature/tgbot-new-client-creation-params
  • c869c3f fix(tgbot): improve client creation UX, Sub ID validation and RTL support
  • 64bfb8f fix: add missing sub_id and flow translation for zn-CN, zh-TW and vi-VN
  • f6ae9b9 Merge branch 'main' into feature/tgbot-new-client-creation-params
  • 9d9ae03 Update es_Es.toml
  • 9761ef4 Update vi_VN.toml
  • b19003e Merge branch 'main' into feature/tgbot-new-client-creation-params
  • eb9f5ce Merge branch 'main' into feature/tgbot-new-client-creation-params

📊 Changes

16 files changed (+7922 additions, -8415 deletions)

View changed files

📝 web/controller/setting.go (+4 -0)
📝 web/locale/locale.go (+15 -2)
📝 web/service/tgbot.go (+1129 -1756)
📝 web/translation/ar-EG.json (+837 -829)
📝 web/translation/en-US.json (+15 -0)
📝 web/translation/es-ES.json (+837 -829)
📝 web/translation/fa-IR.json (+8 -0)
📝 web/translation/id-ID.json (+845 -837)
📝 web/translation/ja-JP.json (+837 -829)
📝 web/translation/pt-BR.json (+845 -837)
📝 web/translation/ru-RU.json (+14 -0)
📝 web/translation/tr-TR.json (+845 -837)
📝 web/translation/uk-UA.json (+837 -829)
📝 web/translation/vi-VN.json (+9 -1)
📝 web/translation/zh-CN.json (+8 -0)
📝 web/translation/zh-TW.json (+837 -829)

📄 Description

What is the pull request?

This PR supersedes and re-implements the features from the closed PR #3882, making them fully compatible with the v3.0+ architecture.

It enhances the Telegram bot's client creation wizard with the following improvements:

  • VLESS Flow & Sub ID Support: Administrators can now configure Flow (e.g., xtls-rprx-vision) and Sub ID directly via the
    Telegram bot when adding a new client.
  • Concurrent-Safe Bot State: Completely refactored the "Add Client" wizard state. Replaced package-level global variables
    with a thread-safe map (clientStates map[int64]*ClientState), eliminating data race conditions when multiple
    administrators use the bot simultaneously.
  • Dynamic Localization: The bot's language now updates dynamically in real-time when the tgLang setting is changed in the
    web panel (no service restart required).
  • Full i18n Support: Replaced hardcoded English strings in the bot's client creation cards with proper localization
    wrappers (t.I18nBot()) and synchronized the missing translation keys across all language JSON files to prevent rendering
    issues in non-English/Russian interfaces.

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

Screenshots

image image image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/4327 **Author:** [@rydve](https://github.com/rydve) **Created:** 5/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/tgbot-new-client-creation-params` --- ### 📝 Commits (10+) - [`510db89`](https://github.com/MHSanaei/3x-ui/commit/510db89560e5be437cf9429b33bd3848c6401604) feat(tgbot): add Sub ID and Flow (for VLESS with TCP(raw) and Reality/TLS) selection in client-creation menu. - [`ee92032`](https://github.com/MHSanaei/3x-ui/commit/ee920322bedccae82d38bd5213a534d377fd6684) Update web/service/tgbot.go - [`9b494e0`](https://github.com/MHSanaei/3x-ui/commit/9b494e055fcd7d85bb74e0ae97f31d340e576c77) Merge branch 'MHSanaei:main' into feature/tgbot-new-client-creation-params - [`c869c3f`](https://github.com/MHSanaei/3x-ui/commit/c869c3fc4a139c281bec08a904fe4e7f5e73349a) fix(tgbot): improve client creation UX, Sub ID validation and RTL support - [`64bfb8f`](https://github.com/MHSanaei/3x-ui/commit/64bfb8f6b612bcc9ed4761ad38f7aedaa95f3af0) fix: add missing sub_id and flow translation for zn-CN, zh-TW and vi-VN - [`f6ae9b9`](https://github.com/MHSanaei/3x-ui/commit/f6ae9b985841a5af4348817718d656614d58a2cb) Merge branch 'main' into feature/tgbot-new-client-creation-params - [`9d9ae03`](https://github.com/MHSanaei/3x-ui/commit/9d9ae03095ecae5404fe94507d5d650cc29f6360) Update es_Es.toml - [`9761ef4`](https://github.com/MHSanaei/3x-ui/commit/9761ef4dcf31abd7873cdca970fc43b6f5d06ee7) Update vi_VN.toml - [`b19003e`](https://github.com/MHSanaei/3x-ui/commit/b19003ea0d1cb02be04051b04f56b77ec615405c) Merge branch 'main' into feature/tgbot-new-client-creation-params - [`eb9f5ce`](https://github.com/MHSanaei/3x-ui/commit/eb9f5ce3f685477fd54be636a004d0533b6309be) Merge branch 'main' into feature/tgbot-new-client-creation-params ### 📊 Changes **16 files changed** (+7922 additions, -8415 deletions) <details> <summary>View changed files</summary> 📝 `web/controller/setting.go` (+4 -0) 📝 `web/locale/locale.go` (+15 -2) 📝 `web/service/tgbot.go` (+1129 -1756) 📝 `web/translation/ar-EG.json` (+837 -829) 📝 `web/translation/en-US.json` (+15 -0) 📝 `web/translation/es-ES.json` (+837 -829) 📝 `web/translation/fa-IR.json` (+8 -0) 📝 `web/translation/id-ID.json` (+845 -837) 📝 `web/translation/ja-JP.json` (+837 -829) 📝 `web/translation/pt-BR.json` (+845 -837) 📝 `web/translation/ru-RU.json` (+14 -0) 📝 `web/translation/tr-TR.json` (+845 -837) 📝 `web/translation/uk-UA.json` (+837 -829) 📝 `web/translation/vi-VN.json` (+9 -1) 📝 `web/translation/zh-CN.json` (+8 -0) 📝 `web/translation/zh-TW.json` (+837 -829) </details> ### 📄 Description ## What is the pull request? This PR supersedes and re-implements the features from the closed PR #3882, making them fully compatible with the v3.0+ architecture. It enhances the Telegram bot's client creation wizard with the following improvements: * VLESS Flow & Sub ID Support: Administrators can now configure Flow (e.g., xtls-rprx-vision) and Sub ID directly via the Telegram bot when adding a new client. * Concurrent-Safe Bot State: Completely refactored the "Add Client" wizard state. Replaced package-level global variables with a thread-safe map (clientStates map[int64]*ClientState), eliminating data race conditions when multiple administrators use the bot simultaneously. * Dynamic Localization: The bot's language now updates dynamically in real-time when the tgLang setting is changed in the web panel (no service restart required). * Full i18n Support: Replaced hardcoded English strings in the bot's client creation cards with proper localization wrappers (t.I18nBot()) and synchronized the missing translation keys across all language JSON files to prevent rendering issues in non-English/Russian interfaces. ## Which part of the application is affected by the change? - [x] Frontend - [x] Backend ## Type of Changes - [x] Bug fix - [x] New feature - [x] Refactoring - [ ] Other ## Screenshots <img width="505" height="538" alt="image" src="https://github.com/user-attachments/assets/ec665b58-6599-44bc-8f4c-4cf13b744614" /> <img width="450" height="390" alt="image" src="https://github.com/user-attachments/assets/be59c7c2-2e6e-4c9b-bc61-8c65de2ffd0c" /> <img width="305" height="115" alt="image" src="https://github.com/user-attachments/assets/912248b8-d3bc-4ffa-8413-6bf03d33caa1" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:03:08 +07:00
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#5662
No description provided.