mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #3231] "Inbound traffic always zero + client quota not working" #2186
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#2186
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sadramv on GitHub (Jul 13, 2025).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3231
Describe the bug
Hello,
Thank you for your work on this panel. I'm facing a few issues:
In the Inbound section, both incoming and outgoing traffic always show zero, even though actual traffic is being used. However, in the Overview section, the usage data is displayed correctly.
The traffic and time limits set for clients are not being enforced. Clients continue using the service even after their quota or time limit is supposed to expire.
Additionally, the individual traffic usage per client is not being calculated properly — it stays at zero.
I appreciate your help in fixing these bugs. Let me know if you need logs or more details.
Thanks again!
How to repeat the problem?
Install and run the latest version of 3x-ui.
Create a new inbound (e.g. VMess or VLESS).
Add a client and set both traffic limit (e.g. 1GB) and expiry time (e.g. 1 day).
Connect using the client and start generating traffic (e.g. download a file or stream video).
Check the Inbound section — incoming and outgoing traffic stay at 0 B.
Check the Overview section — traffic usage is displayed correctly there.
Wait until the client hits the time or traffic limit — it still works and doesn't get disabled.
Check the client traffic usage — it's still showing 0 B even after usage.
Expected action
No response
Received action
No response
3x-ui Version
2.6.2
Xray-core Version
25.6.8
Checklist
@xinhai-ai commented on GitHub (Jul 14, 2025):
You can manually change the policy value in xray configs -> advanced, so that traffic can be counted properly.
@sadramv commented on GitHub (Jul 14, 2025):
Thanks for your response.
I already applied the changes you suggested to the policy section in the xray config under "advanced", but unfortunately, it didn’t work. The traffic is still not being counted properly.
Do you have any other suggestions?
@xinhai-ai commented on GitHub (Jul 14, 2025):
Sorry, I don't know what to do either. I encountered the same issue you described. After I reviewed the xray-core documentation and added this section, the problem was resolved. Could you please share your config.json (make sure to hide any Confidential Information)?
@sadramv commented on GitHub (Jul 14, 2025):
Here’s my current
config.json(with all sensitive information removed):Let me know if you spot anything missing or incorrect.
Thanks again!
@xinhai-ai commented on GitHub (Jul 14, 2025):
It looks fine, no different from my configuration file, and I have no idea what the problem is
@sadramv commented on GitHub (Jul 14, 2025):
Thank you so much for taking the time to check and compare it with your own config. I really appreciate your help — at least now I know the issue isn’t in the configuration itself. I’ll keep digging. Thanks again!
@lelekahobby commented on GitHub (Jul 24, 2025):
This routing rule should be at the very top.:
@petrosey commented on GitHub (Aug 12, 2025):
"concurrency": 3, I want to change this to accommodate more users but it keeps coming to 3 always and is it the panels fault that it gets weak and used by many users although I am using 2 gb ram lightsaill
@Ramiz69 commented on GitHub (Aug 27, 2025):
Same problem: Inbound traffic always zero
@evilnero commented on GitHub (Mar 2, 2026):
I had this issue because my iptables firewall was blocking loopback (127.0.0.1) connections.
3x-ui communicates with Xray via the local API (127.0.0.1).
If loopback traffic is blocked, the panel cannot read StatsService data.
You can check your rules with:
iptables -S
To make sure loopback traffic is allowed in the filter table, add following rule:
iptables -A INPUT -i lo -j ACCEPTCommand to add this above everything else:
iptables -I INPUT 1 -i lo -j ACCEPTAfter fixing, my rules look like (iptables -S):
You can try to reset all rules (careful!)
Be careful when flushing firewall rules on a remote server — you may lock yourself out. I personally use netfilter-persistent and iptables-persistent to save and reload them.
@Sameguyy commented on GitHub (Mar 26, 2026):
@xinhai-ai Please tell me, how did you edit the config.json, doesn't 3x-ui recreate it every time you start xray?
At the end of my config file, lines are constantly added:
I don't understand where this line comes from
It seems to me that this line is why the calculation does not work