[GH-ISSUE #5574] [Feature]: Optimization Proposal #3893

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

Originally created by @FPu3EpOBIIIuK on GitHub (Jun 25, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5574

Not all clients in the subscription need routing rules.

Describe the solution you'd like

Hello, I've encountered an issue where not all clients in the subscription require routing. I would like to add an option in the client settings that disables the addition of routing to the subscription. I am using the Happ subscription.

Alternatives you've considered

No response

Concrete use case

No response

Mockups, screenshots, or examples

No response

Which parts of the panel would this affect?

No response

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 @FPu3EpOBIIIuK on GitHub (Jun 25, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5574 ### Is your feature request related to a problem? Not all clients in the subscription need routing rules. ### Describe the solution you'd like Hello, I've encountered an issue where not all clients in the subscription require routing. I would like to add an option in the client settings that disables the addition of routing to the subscription. I am using the Happ subscription. ### Alternatives you've considered _No response_ ### Concrete use case _No response_ ### Mockups, screenshots, or examples _No response_ ### Which parts of the panel would this affect? _No response_ ### 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 - [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 (Jun 25, 2026):

The request is to add a per-client toggle that suppresses Happ routing delivery in the subscription response. This is currently not possible — routing is a panel-wide setting with no client-level override.

What the code confirms

  • The subscription routing configuration is stored globally under the keys subEnableRouting and subRoutingRules in SettingService (internal/web/service/setting.go, lines 79, 80, 704–705).
  • SUBController receives these global values and writes identical Routing-Enable and Routing HTTP response headers for every client's subscription request (internal/sub/controller.go, lines 194, 378, 395, 435–437).
  • The Client model (internal/database/model/model.go, line 590) and the persisted ClientRecord struct (line 611) have no field for per-client routing behavior.

What an implementation would require

  1. Add a field to Client / ClientRecord (e.g., DisableRouting bool) and a database migration.
  2. Pass that field through the subscription lookup and into SUBController so the per-client value can override the global subEnableRouting flag for a specific request.
  3. Expose the field in the client edit UI.

There is a related but distinct closed request, #4479, which proposed per-inbound routing overrides rather than per-client ones. If you are willing to implement this, contributions via pull request following the existing patterns in internal/sub/ and internal/database/model/model.go would be the right starting point.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:4803434761 --> @github-actions[bot] commented on GitHub (Jun 25, 2026): The request is to add a per-client toggle that suppresses Happ routing delivery in the subscription response. This is currently not possible — routing is a panel-wide setting with no client-level override. **What the code confirms** - The subscription routing configuration is stored globally under the keys `subEnableRouting` and `subRoutingRules` in `SettingService` (`internal/web/service/setting.go`, lines 79, 80, 704–705). - `SUBController` receives these global values and writes identical `Routing-Enable` and `Routing` HTTP response headers for every client's subscription request (`internal/sub/controller.go`, lines 194, 378, 395, 435–437). - The `Client` model (`internal/database/model/model.go`, line 590) and the persisted `ClientRecord` struct (line 611) have no field for per-client routing behavior. **What an implementation would require** 1. Add a field to `Client` / `ClientRecord` (e.g., `DisableRouting bool`) and a database migration. 2. Pass that field through the subscription lookup and into `SUBController` so the per-client value can override the global `subEnableRouting` flag for a specific request. 3. Expose the field in the client edit UI. There is a related but distinct closed request, #4479, which proposed per-inbound routing overrides rather than per-client ones. If you are willing to implement this, contributions via pull request following the existing patterns in `internal/sub/` and `internal/database/model/model.go` would be the right starting point. *This reply was generated automatically; 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#3893
No description provided.