mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #1822] 流量监控对不上,入站的流量和用户的流量对不上 #1242
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#1242
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 @2382323268 on GitHub (Feb 15, 2024).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/1822
Welcome
Description of the problem,screencshot would be good
比如看视频或者进行网速测试,入站流量消耗了200多m,用户的流量才消耗70m,差距有个3到5倍

Version of 3x-ui
x-ui log reports or xray log
@pulsarice commented on GitHub (Feb 17, 2024):
Reset both inbound and user traffic and test again. I don't have this problem in 3x-ui.
@2382323268 commented on GitHub (Feb 18, 2024):
@pulsarice commented on GitHub (Feb 18, 2024):
can you post your xray config here? (xray config > advanced > all)
@2382323268 commented on GitHub (Feb 18, 2024):
{
"log": {
"access": "/usr/local/x-ui/bin/access.log",
"error": "/usr/local/x-ui/bin/error.log",
"loglevel": "warning",
"dnsLog": false
},
"api": {
"services": [
"HandlerService",
"LoggerService",
"StatsService"
],
"tag": "api"
},
"inbounds": [
{
"listen": "127.0.0.1",
"port": 62789,
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1"
},
"tag": "api"
}
],
"outbounds": [
{
"tag": "direct",
"protocol": "freedom",
"settings": {}
},
{
"tag": "openai_proxy",
"protocol": "socks",
"settings": {
"servers": [
{
"address": "127.0.0.1",
"port": 40000
}
]
}
},
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"policy": {
"levels": {
"0": {
"statsUserDownlink": true,
"statsUserUplink": true
}
},
"system": {
"statsInboundDownlink": true,
"statsInboundUplink": true,
"statsOutboundDownlink": true,
"statsOutboundUplink": true
}
},
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"outboundTag": "openai_proxy",
"domain": [
"geosite:openai",
"geosite:instagram"
]
},
{
"inboundTag": [
"api"
],
"outboundTag": "api",
"type": "field"
},
{
"ip": [
"geoip:private"
],
"outboundTag": "blocked",
"type": "field"
},
{
"outboundTag": "blocked",
"protocol": [
"bittorrent"
],
"type": "field"
}
]
},
"stats": {}
}
@2382323268 commented on GitHub (Feb 18, 2024):
我测试vless+ws+tls是正常的,但是vless+Reality不正常
@pulsarice commented on GitHub (Feb 18, 2024):
I'm curious, please test Reality without xtls-rprx-vision. (empty flow) see if still has a problem. I remember something like this happened to me before.
@2382323268 commented on GitHub (Feb 18, 2024):
的确是xtls-rprx-vision导致的,我测试不设置xtls-rprx-vision的情况下流量是正常的,请问这个能修复吗,或者说我不设置xtls-rprx-vision会有什么影响
@pulsarice commented on GitHub (Feb 18, 2024):
Also move api rules to the top like this and test
@2382323268 commented on GitHub (Feb 18, 2024):
一样的结果,看来得把xtls-rprx-vision设空才行
@pulsarice commented on GitHub (Feb 18, 2024):
I had this problem on my domestic vps server, where:
user >---reality---> domestic vps >---reality-xtls--> foreign vps
and domestic vps didn't count user's traffic.
Then I changed it to:
user >---reality---> domestic vps >---vless-tcp--> foreign vps
and it got fixed.
Tomorrow I'll try to test your config on a clean server and reproduce that behaviour.
@2382323268 commented on GitHub (Feb 18, 2024):
感谢!已经解决,是xray的bug,
把xray的版本降级到1.8.4
使用xtls-rprx-vision统计流量即可正常