[GH-ISSUE #6534] [Feature]: Shared traffic quota for client groups #4385

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

Originally created by @AlexeysM14 on GitHub (Sep 14, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6534

Yes. The current client traffic limit is applied independently to each client. Client groups are useful for organization and bulk actions, but they do not provide a single shared traffic quota that is consumed collectively by all members of a group.

For example, an administrator may want to create a group with 10 clients and give the whole group a shared quota of 500 GB. One client could use 300 GB and another 200 GB, exhausting the group's 500 GB quota. With the current per-client quota model, the administrator has to assign separate limits to each client, which does not provide a true shared pool.

This is especially useful for family, team, temporary access, or shared subscription scenarios where the administrator wants a single quota for a set of clients.

Describe the solution you'd like

Add an optional Shared Traffic Quota to client groups.

Suggested behavior:

  • A group can optionally have a shared traffic quota, for example 500 GB.
  • All clients assigned to that group consume the same quota pool.
  • Usage should be calculated as the sum of upload and download traffic of all active members of the group.
  • When the shared quota is exhausted, all clients in the group should be disabled automatically, or the group should otherwise prevent further traffic according to the existing quota-disable behavior.
  • The group should display:
    • shared quota;
    • total traffic used;
    • remaining traffic;
    • usage percentage;
    • number of active/depleted clients.
  • Adding or removing a client from the group should immediately affect the group membership used for quota accounting.
  • The shared quota should work independently from the existing per-client Total (GB) limit. An administrator could optionally use both, with the first limit reached taking effect.
  • Add an optional Reset period for the shared quota, similar to the existing client Reset functionality, so a group quota can renew automatically (for example, every 30 days).
  • The group quota should work consistently with multi-node deployments and use the same traffic accounting source as individual client quotas.
  • Provide bulk actions to set, change, reset, and remove the shared quota for a group.

Example:

Group: Family
Shared quota: 500 GB

Alice: 120 GB
Bob: 80 GB
Charlie: 250 GB

Group usage: 450 / 500 GB
Remaining: 50 GB

After another 50 GB is consumed by any combination of group members, the shared quota is exhausted and the existing client-disable mechanism can be applied to all clients in the group.

### Alternatives you've considered

The current workaround is to assign individual traffic limits to every client or manage the quota externally with scripts/API calls. Neither approach provides a native shared quota pool and both require additional administration.

The existing client group functionality and group policies are useful for organizing clients and applying common settings, but they do not provide a shared consumable traffic pool.

### Concrete use case

I manage a group of multiple clients that should share one total monthly traffic allowance. I want to give the group a single quota such as 500 GB, allowing users to consume that quota dynamically instead of pre-allocating 500 GB across individual clients.

For example, with 14 clients and a 500 GB group quota, any client can use any portion of the remaining pool. The administrator should not need to predict how much traffic each individual client will consume.

### Mockups, screenshots, or examples

_No response_

### Which parts of the panel would this affect?

Frontend (UI / panel pages), Backend (API endpoints, login, settings), Statistics / traffic counters, Telegram bot

### 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.
Originally created by @AlexeysM14 on GitHub (Sep 14, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6534 ### Is your feature request related to a problem? Yes. The current client traffic limit is applied independently to each client. Client groups are useful for organization and bulk actions, but they do not provide a single shared traffic quota that is consumed collectively by all members of a group. For example, an administrator may want to create a group with 10 clients and give the whole group a shared quota of 500 GB. One client could use 300 GB and another 200 GB, exhausting the group's 500 GB quota. With the current per-client quota model, the administrator has to assign separate limits to each client, which does not provide a true shared pool. This is especially useful for family, team, temporary access, or shared subscription scenarios where the administrator wants a single quota for a set of clients. ### Describe the solution you'd like Add an optional **Shared Traffic Quota** to client groups. Suggested behavior: - A group can optionally have a shared traffic quota, for example 500 GB. - All clients assigned to that group consume the same quota pool. - Usage should be calculated as the sum of upload and download traffic of all active members of the group. - When the shared quota is exhausted, all clients in the group should be disabled automatically, or the group should otherwise prevent further traffic according to the existing quota-disable behavior. - The group should display: - shared quota; - total traffic used; - remaining traffic; - usage percentage; - number of active/depleted clients. - Adding or removing a client from the group should immediately affect the group membership used for quota accounting. - The shared quota should work independently from the existing per-client `Total (GB)` limit. An administrator could optionally use both, with the first limit reached taking effect. - Add an optional **Reset period** for the shared quota, similar to the existing client `Reset` functionality, so a group quota can renew automatically (for example, every 30 days). - The group quota should work consistently with multi-node deployments and use the same traffic accounting source as individual client quotas. - Provide bulk actions to set, change, reset, and remove the shared quota for a group. Example: ```text Group: Family Shared quota: 500 GB Alice: 120 GB Bob: 80 GB Charlie: 250 GB Group usage: 450 / 500 GB Remaining: 50 GB After another 50 GB is consumed by any combination of group members, the shared quota is exhausted and the existing client-disable mechanism can be applied to all clients in the group. ### Alternatives you've considered The current workaround is to assign individual traffic limits to every client or manage the quota externally with scripts/API calls. Neither approach provides a native shared quota pool and both require additional administration. The existing client group functionality and group policies are useful for organizing clients and applying common settings, but they do not provide a shared consumable traffic pool. ### Concrete use case I manage a group of multiple clients that should share one total monthly traffic allowance. I want to give the group a single quota such as 500 GB, allowing users to consume that quota dynamically instead of pre-allocating 500 GB across individual clients. For example, with 14 clients and a 500 GB group quota, any client can use any portion of the remaining pool. The administrator should not need to predict how much traffic each individual client will consume. ### Mockups, screenshots, or examples _No response_ ### Which parts of the panel would this affect? Frontend (UI / panel pages), Backend (API endpoints, login, settings), Statistics / traffic counters, Telegram bot ### 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

@mitsukuri commented on GitHub (Oct 30, 2026):

At the very least, there should be a way to set traffic limit to all selected users at once.

<!-- gh-comment-id:6519305373 --> @mitsukuri commented on GitHub (Oct 30, 2026): At the very least, there should be a way to set traffic limit to all selected users at once.
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#4385
No description provided.