[GH-ISSUE #5521] [Feature]: Add custom group inbound selection - first inbound sub #3853

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

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

dear sanaei,
thanks for your fantastic effort and your brillient project.
I would like to ask you to add custom inbound selection feature
its like for example we set 5 diffrent inbounds as a one group and when we want to select inbounds in client erea , we select that one group option to add those 5 inbounds only with one click and no need to click 5 inbounds one by one...
i know there is attach option with selection option but adding group inbounds with one click make its better when we want to creat new client.

the second thing is when we set to show remaining days or traffic in client's subscription, it apears in first inbound which we added to client's sub and its not good looking... can we have a unique inbounds as first inbounds in subscription client for only showing details and not work as inbound ?
God bless you
BR,

Describe the solution you'd like

dear sanaei,
thanks for your fantastic effort and your brillient project.
I would like to ask you to add custom inbound selection feature
its like for example we set 5 diffrent inbounds as a one group and when we want to select inbounds in client erea , we select that one group option to add those 5 inbounds only with one click and no need to click 5 inbounds one by one...
i know there is attach option with selection option but adding group inbounds with one click make its better when we want to creat new client.

the second thing is when we set to show remaining days or traffic in client's subscription, it apears in first inbound which we added to client's sub and its not good looking... can we have a unique inbounds as first inbounds in subscription client for only showing details and not work as inbound ?
God bless you
BR,

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 @Morteza820 on GitHub (Jun 23, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5521 ### Is your feature request related to a problem? dear sanaei, thanks for your fantastic effort and your brillient project. I would like to ask you to add custom inbound selection feature its like for example we set 5 diffrent inbounds as a one group and when we want to select inbounds in client erea , we select that one group option to add those 5 inbounds only with one click and no need to click 5 inbounds one by one... i know there is attach option with selection option but adding group inbounds with one click make its better when we want to creat new client. the second thing is when we set to show remaining days or traffic in client's subscription, it apears in first inbound which we added to client's sub and its not good looking... can we have a unique inbounds as first inbounds in subscription client for only showing details and not work as inbound ? God bless you BR, ### Describe the solution you'd like dear sanaei, thanks for your fantastic effort and your brillient project. I would like to ask you to add custom inbound selection feature its like for example we set 5 diffrent inbounds as a one group and when we want to select inbounds in client erea , we select that one group option to add those 5 inbounds only with one click and no need to click 5 inbounds one by one... i know there is attach option with selection option but adding group inbounds with one click make its better when we want to creat new client. the second thing is when we set to show remaining days or traffic in client's subscription, it apears in first inbound which we added to client's sub and its not good looking... can we have a unique inbounds as first inbounds in subscription client for only showing details and not work as inbound ? God bless you BR, ### 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 23, 2026):

This report contains two separate feature requests. Here is what the current code does and what each request would require.

Feature 1 — Inbound group presets for client creation

The panel already supports attaching a single client to multiple inbounds in one operation. The client creation API (POST /panel/api/clients/add) accepts a SaveCreatePayload with an inboundIds: number[] array, and the frontend ClientFormModal (frontend/src/pages/clients/ClientFormModal.tsx) renders a multi-select over all available inbounds. The underlying data is stored in the client_inbounds junction table (internal/database/model/model.go, ClientInbound struct).

What does not exist is a saved-preset or group concept: there is no InboundGroup table and no foreign key on Inbound that would let you name a set of inbounds and then select the whole set with one click. Implementing this would require at minimum:

  • A new inbound_groups table (id, name) and a group_id column on Inbound (or a separate pivot table).
  • Backend service and API endpoints to list/create/update/delete groups.
  • A frontend change to let the client form filter the inbound multi-select by group, expanding to the full member list automatically.

Feature 2 — Info-only "header" entry in subscription output

The traffic/expiry summary that appears at the top of a client subscription page is not derived from any inbound entry. It is carried as an HTTP response header (Subscription-Userinfo / x-subscription-userinfo) with the value upload=X; download=Y; total=Z; expire=T and is computed by aggregating all ClientTraffic rows for the client's emails (internal/sub/service.go, AggregateTrafficByEmails()). The same header is set across all three subscription formats (raw links in internal/sub/controller.go, JSON in internal/sub/json_service.go, Clash in internal/sub/clash_service.go).

There is no mechanism to mark an inbound as "info-only" or to inject a non-functional first link that a client app would render as a summary entry rather than a connectable proxy. Subscription links are generated unconditionally for every active inbound a client is attached to, sorted by SubSortIndex then id (internal/sub/service.go, getInboundsBySubId()). Adding this would require:

  • A new boolean field (e.g., Inbound.IsInfoOnly) persisted to the database.
  • Logic in internal/sub/service.go to skip info-only inbounds when building proxy links but include them (or their metadata) in a rendered header entry.
  • Client-app awareness of the convention, since no standard URI scheme for a "display-only" subscription entry currently exists in the broader ecosystem.

Both features are non-trivial additions. If you or anyone else wants to implement either, a PR with schema migrations and service/controller/frontend changes would be the path forward. The PR welcomed label can be requested from maintainers if you plan to submit one.

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

<!-- gh-comment-id:4784033427 --> @github-actions[bot] commented on GitHub (Jun 23, 2026): This report contains two separate feature requests. Here is what the current code does and what each request would require. **Feature 1 — Inbound group presets for client creation** The panel already supports attaching a single client to multiple inbounds in one operation. The client creation API (`POST /panel/api/clients/add`) accepts a `SaveCreatePayload` with an `inboundIds: number[]` array, and the frontend `ClientFormModal` (`frontend/src/pages/clients/ClientFormModal.tsx`) renders a multi-select over all available inbounds. The underlying data is stored in the `client_inbounds` junction table (`internal/database/model/model.go`, `ClientInbound` struct). What does not exist is a saved-preset or group concept: there is no `InboundGroup` table and no foreign key on `Inbound` that would let you name a set of inbounds and then select the whole set with one click. Implementing this would require at minimum: - A new `inbound_groups` table (id, name) and a `group_id` column on `Inbound` (or a separate pivot table). - Backend service and API endpoints to list/create/update/delete groups. - A frontend change to let the client form filter the inbound multi-select by group, expanding to the full member list automatically. **Feature 2 — Info-only "header" entry in subscription output** The traffic/expiry summary that appears at the top of a client subscription page is not derived from any inbound entry. It is carried as an HTTP response header (`Subscription-Userinfo` / `x-subscription-userinfo`) with the value `upload=X; download=Y; total=Z; expire=T` and is computed by aggregating all `ClientTraffic` rows for the client's emails (`internal/sub/service.go`, `AggregateTrafficByEmails()`). The same header is set across all three subscription formats (raw links in `internal/sub/controller.go`, JSON in `internal/sub/json_service.go`, Clash in `internal/sub/clash_service.go`). There is no mechanism to mark an inbound as "info-only" or to inject a non-functional first link that a client app would render as a summary entry rather than a connectable proxy. Subscription links are generated unconditionally for every active inbound a client is attached to, sorted by `SubSortIndex` then `id` (`internal/sub/service.go`, `getInboundsBySubId()`). Adding this would require: - A new boolean field (e.g., `Inbound.IsInfoOnly`) persisted to the database. - Logic in `internal/sub/service.go` to skip info-only inbounds when building proxy links but include them (or their metadata) in a rendered header entry. - Client-app awareness of the convention, since no standard URI scheme for a "display-only" subscription entry currently exists in the broader ecosystem. Both features are non-trivial additions. If you or anyone else wants to implement either, a PR with schema migrations and service/controller/frontend changes would be the path forward. The `PR welcomed` label can be requested from maintainers if you plan to submit one. *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#3853
No description provided.