[GH-ISSUE #2933] Add accumulative traffic (flow) for multiple config of the same client #1958

Closed
opened 2026-10-31 20:22:14 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @emranovin on GitHub (Apr 22, 2025).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/2933

Is your feature request related to a problem? Please describe.
There is a scenario in which I want to assign a total of 100 GB to a user, but I want to give him multiple configs (like ss, vless, vmess, etc). With the same subscription link, this can happen. But if I create 4 different configs, I have to set 25 GB for each config, and user have to change their config after consuming each 25 GB, which is unfortunate.
If I assign 100 GB to each config, there would be 400 GB, and it's unfortunate for me as a server owner.

Describe the solution you'd like
As a user, I'd rather consume any of the SS or VLESS config by choice, but all of them can have 100 GB total flow. It would be like cumulative traffic. It doesn't matter if I consume from any of the configs. After all, they are all bound to the same 100 GB account. For example, I can use vless config to use all 100 GB or use Shadowsocks to use all 100 GB.
To elaborate more, as a user, I can consume 20 GB with the SS config, and my remaining flow would be 80 GB. I can switch to the VMESS config and consume the remaining 80 GB with this config. I have an arbitrary choice to use any of the configs that best suit my network, and my overall usage would not exceed 100 GB.

Originally created by @emranovin on GitHub (Apr 22, 2025). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/2933 **Is your feature request related to a problem? Please describe.** There is a scenario in which I want to assign a total of 100 GB to a user, but I want to give him multiple configs (like ss, vless, vmess, etc). With the same subscription link, this can happen. But if I create 4 different configs, I have to set 25 GB for each config, and user have to change their config after consuming each 25 GB, which is unfortunate. If I assign 100 GB to each config, there would be 400 GB, and it's unfortunate for me as a server owner. **Describe the solution you'd like** As a user, I'd rather consume any of the SS or VLESS config by choice, but all of them can have 100 GB total flow. It would be like cumulative traffic. It doesn't matter if I consume from any of the configs. After all, they are all bound to the same 100 GB account. For example, I can use vless config to use all 100 GB or use Shadowsocks to use all 100 GB. To elaborate more, as a user, I can consume 20 GB with the SS config, and my remaining flow would be 80 GB. I can switch to the VMESS config and consume the remaining 80 GB with this config. I have an arbitrary choice to use any of the configs that best suit my network, and my overall usage would not exceed 100 GB.
bsakaguchi 2026-10-31 20:22:14 +07:00
Author
Owner

@AliAkhgar commented on GitHub (May 10, 2025):

I believe this goes beyond the capabilities of the XrayCore itself, not even mentioning 3X-UI. (as XrayCore unique identifier for users seems to be the email field, correct me if I'm wrong.)
To solve this issue, you'll need to aggregate user's info on a central server with the help of the feature External Traffic Inform, even allowing the user to have access to multiple different instances of 3X-UI on multiple servers.

Is your feature request related to a problem? Please describe. There is a scenario in which I want to assign a total of 100 GB to a user, but I want to give him multiple configs (like ss, vless, vmess, etc). With the same subscription link, this can happen. But if I create 4 different configs, I have to set 25 GB for each config, and user have to change their config after consuming each 25 GB, which is unfortunate. If I assign 100 GB to each config, there would be 400 GB, and it's unfortunate for me as a server owner.

Describe the solution you'd like As a user, I'd rather consume any of the SS or VLESS config by choice, but all of them can have 100 GB total flow. It would be like cumulative traffic. It doesn't matter if I consume from any of the configs. After all, they are all bound to the same 100 GB account. For example, I can use vless config to use all 100 GB or use Shadowsocks to use all 100 GB. To elaborate more, as a user, I can consume 20 GB with the SS config, and my remaining flow would be 80 GB. I can switch to the VMESS config and consume the remaining 80 GB with this config. I have an arbitrary choice to use any of the configs that best suit my network, and my overall usage would not exceed 100 GB.

<!-- gh-comment-id:2869154319 --> @AliAkhgar commented on GitHub (May 10, 2025): I believe this goes beyond the capabilities of the XrayCore itself, not even mentioning 3X-UI. (as XrayCore unique identifier for users seems to be the email field, correct me if I'm wrong.) To solve this issue, you'll need to aggregate user's info on a central server with the help of the feature External Traffic Inform, even allowing the user to have access to multiple different instances of 3X-UI on multiple servers. > **Is your feature request related to a problem? Please describe.** There is a scenario in which I want to assign a total of 100 GB to a user, but I want to give him multiple configs (like ss, vless, vmess, etc). With the same subscription link, this can happen. But if I create 4 different configs, I have to set 25 GB for each config, and user have to change their config after consuming each 25 GB, which is unfortunate. If I assign 100 GB to each config, there would be 400 GB, and it's unfortunate for me as a server owner. > > **Describe the solution you'd like** As a user, I'd rather consume any of the SS or VLESS config by choice, but all of them can have 100 GB total flow. It would be like cumulative traffic. It doesn't matter if I consume from any of the configs. After all, they are all bound to the same 100 GB account. For example, I can use vless config to use all 100 GB or use Shadowsocks to use all 100 GB. To elaborate more, as a user, I can consume 20 GB with the SS config, and my remaining flow would be 80 GB. I can switch to the VMESS config and consume the remaining 80 GB with this config. I have an arbitrary choice to use any of the configs that best suit my network, and my overall usage would not exceed 100 GB.
Author
Owner

@emranovin commented on GitHub (May 10, 2025):

I believe this goes beyond the capabilities of the XrayCore itself, not even mentioning 3X-UI. (as XrayCore unique identifier for users seems to be the email field, correct me if I'm wrong.) To solve this issue, you'll need to aggregate user's info on a central server with the help of the feature External Traffic Inform, even allowing the user to have access to multiple different instances of 3X-UI on multiple servers.

I'm not sure if I've got your point right but I didn't mean to get accumulative traffic between server instancces. I request this feature on a single server with multiple configurations.
Now I had to define only one configuration at a time cause if I define 2 config user will get 2 times traffic which is unfortunate.

<!-- gh-comment-id:2869157974 --> @emranovin commented on GitHub (May 10, 2025): > I believe this goes beyond the capabilities of the XrayCore itself, not even mentioning 3X-UI. (as XrayCore unique identifier for users seems to be the email field, correct me if I'm wrong.) To solve this issue, you'll need to aggregate user's info on a central server with the help of the feature External Traffic Inform, even allowing the user to have access to multiple different instances of 3X-UI on multiple servers. > I'm not sure if I've got your point right but I didn't mean to get accumulative traffic between server instancces. I request this feature on a single server with multiple configurations. Now I had to define only one configuration at a time cause if I define 2 config user will get 2 times traffic which is unfortunate.
Author
Owner

@AliAkhgar commented on GitHub (May 10, 2025):

I believe this goes beyond the capabilities of the XrayCore itself, not even mentioning 3X-UI. (as XrayCore unique identifier for users seems to be the email field, correct me if I'm wrong.) To solve this issue, you'll need to aggregate user's info on a central server with the help of the feature External Traffic Inform, even allowing the user to have access to multiple different instances of 3X-UI on multiple servers.

I'm not sure if I've got your point right but I didn't mean to get accumulative traffic between server instancces. I request this feature on a single server with multiple configurations. Now I had to define only one configuration at a time cause if I define 2 config user will get 2 times traffic which is unfortunate.

You are correct. AFAIK, aggregating on a single server is not possible too.
If we could define a client with the same email on multiple inbounds, we might be able to do that, but we can not do that either.
So in this case, we still need a central server even if we are servicing all clients only on a single 3X-UI instance.

We do have your condition which we register clients on a single 3X-UI, each client in 2 or 3 inbounds. Yet, we can not aggregate them too. External Inform Traffic seems to be the only option to go. Which has a bug as we speak.

<!-- gh-comment-id:2869160853 --> @AliAkhgar commented on GitHub (May 10, 2025): > > I believe this goes beyond the capabilities of the XrayCore itself, not even mentioning 3X-UI. (as XrayCore unique identifier for users seems to be the email field, correct me if I'm wrong.) To solve this issue, you'll need to aggregate user's info on a central server with the help of the feature External Traffic Inform, even allowing the user to have access to multiple different instances of 3X-UI on multiple servers. > > I'm not sure if I've got your point right but I didn't mean to get accumulative traffic between server instancces. I request this feature on a single server with multiple configurations. Now I had to define only one configuration at a time cause if I define 2 config user will get 2 times traffic which is unfortunate. You are correct. AFAIK, aggregating on a single server is not possible too. If we could define a client with the same email on multiple inbounds, we might be able to do that, but we can not do that either. So in this case, we still need a central server even if we are servicing all clients only on a single 3X-UI instance. We do have your condition which we register clients on a single 3X-UI, each client in 2 or 3 inbounds. Yet, we can not aggregate them too. External Inform Traffic seems to be the only option to go. Which has a bug as we speak.
Author
Owner

@emranovin commented on GitHub (May 13, 2025):

You are correct. AFAIK, aggregating on a single server is not possible too. If we could define a client with the same email on multiple inbounds, we might be able to do that, but we can not do that either. So in this case, we still need a central server even if we are servicing all clients only on a single 3X-UI instance.

We do have your condition which we register clients on a single 3X-UI, each client in 2 or 3 inbounds. Yet, we can not aggregate them too. External Inform Traffic seems to be the only option to go. Which has a bug as we speak.

Thanks for the elaboration.
At the moment we have a feature which if admin set the same id for subscription link user will have multiple configurations with same link. Can't we use some sort of logic as like as this to recognize which user is which and define user trafic in a single source of truth in the db?
This is not my expertise area and I'm just speculating out of the blue.

<!-- gh-comment-id:2875808169 --> @emranovin commented on GitHub (May 13, 2025): > You are correct. AFAIK, aggregating on a single server is not possible too. If we could define a client with the same email on multiple inbounds, we might be able to do that, but we can not do that either. So in this case, we still need a central server even if we are servicing all clients only on a single 3X-UI instance. > > We do have your condition which we register clients on a single 3X-UI, each client in 2 or 3 inbounds. Yet, we can not aggregate them too. External Inform Traffic seems to be the only option to go. Which has a bug as we speak. Thanks for the elaboration. At the moment we have a feature which if admin set the same id for subscription link user will have multiple configurations with same link. Can't we use some sort of logic as like as this to recognize which user is which and define user trafic in a single source of truth in the db? This is not my expertise area and I'm just speculating out of the blue.
Author
Owner

@AliAkhgar commented on GitHub (May 13, 2025):

You are correct. AFAIK, aggregating on a single server is not possible too. If we could define a client with the same email on multiple inbounds, we might be able to do that, but we can not do that either. So in this case, we still need a central server even if we are servicing all clients only on a single 3X-UI instance.

We do have your condition which we register clients on a single 3X-UI, each client in 2 or 3 inbounds. Yet, we can not aggregate them too. External Inform Traffic seems to be the only option to go. Which has a bug as we speak.

Thanks for the elaboration.
At the moment we have a feature which if admin set the same id for subscription link user will have multiple configurations with same link. Can't we use some sort of logic as like as this to recognize which user is which and define user trafic in a single source of truth in the db?
This is not my expertise area and I'm just speculating out of the blue.

This can be possible with some extra coding and can be done but goes beyond the scope of 3X-UI.
I have already achieved it with the feature External Traffic Inform. A separate server as controller is required.

<!-- gh-comment-id:2877758396 --> @AliAkhgar commented on GitHub (May 13, 2025): > > You are correct. AFAIK, aggregating on a single server is not possible too. If we could define a client with the same email on multiple inbounds, we might be able to do that, but we can not do that either. So in this case, we still need a central server even if we are servicing all clients only on a single 3X-UI instance. > > > > We do have your condition which we register clients on a single 3X-UI, each client in 2 or 3 inbounds. Yet, we can not aggregate them too. External Inform Traffic seems to be the only option to go. Which has a bug as we speak. > > Thanks for the elaboration. > At the moment we have a feature which if admin set the same id for subscription link user will have multiple configurations with same link. Can't we use some sort of logic as like as this to recognize which user is which and define user trafic in a single source of truth in the db? > This is not my expertise area and I'm just speculating out of the blue. This can be possible with some extra coding and can be done but goes beyond the scope of 3X-UI. I have already achieved it with the feature External Traffic Inform. A separate server as controller is required.
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#1958
No description provided.