[GH-ISSUE #4529] Bug report Traffic issue #3098

Closed
opened 2026-10-31 20:30:04 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @jazavaja on GitHub (May 24, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4529

Describe the bug

Hello,

I think there might be a bug with traffic accounting in 3x-ui / Xray when using VLESS + XHTTP + Vercel Relay.

Setup

  • Protocol: VLESS
  • Transport: XHTTP
  • TLS enabled
  • Relay: Vercel Relay (XHTTP Installer)
  • Panel: 3x-ui (MHSanaei Docker image)

Problem

Traffic usage shown in the panel appears to be incorrect or heavily overcounted.

For example:

  • I only connected briefly for testing and disconnected immediately.
  • I am not actively using this VPN.
  • My actual internet connection could not possibly upload/download the amount of traffic shown.

However, after only a few speed tests (from the Windows client ping/speed option), the panel reports extremely high traffic usage (hundreds of MB or even GB).

Important note

The Windows client speed test shows unrealistic bandwidth values (e.g. ~300 Mbps), while my real connection speed is much lower and cannot realistically transfer that amount of data in such a short time.

I also:

  • reset user traffic statistics,
  • restarted services,
  • tested multiple times,

but the issue persists.

My suspicion is that traffic accounting may be affected by:

  • XHTTP protocol, or
  • Vercel Relay / CDN relay behavior, possibly counting relayed/streamed/chunked traffic incorrectly.

Has anyone experienced this issue before, or is this a known limitation/bug with XHTTP + relay setups?

Thank you.


Image

150 mb just one time speed test in v2rayn client!

Image

How to repeat the problem?

For privacy and security reasons, I have redacted or replaced sensitive values in the inbound configuration below (domain names, UUIDs, paths, certificate locations, relay details, IPs, and user-specific identifiers). The overall structure and relevant technical settings are preserved for debugging purposes.

`{
"id": 1,
"enable": true,
"port": 443,
"protocol": "vless",

"settings": {
"clients": [
{
"email": "user1",
"enable": true,
"flow": "",
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"limitIp": 0,
"subId": "xxxx",
"totalGB": 5368709120
}
],
"decryption": "none",
"encryption": "none"
},

"streamSettings": {
"network": "xhttp",
"security": "tls",

"tlsSettings": {
  "serverName": "xxxx.xxxx.xxx",
  "minVersion": "1.0",
  "maxVersion": "1.3",

  "certificates": [
    {
      "certificateFile": "/root/cert/xxxx/fullchain.pem",
      "keyFile": "/root/cert/xxxx/privkey.pem"
    }
  ],

  "alpn": [
    "h2",
    "http/1.1"
  ],

  "settings": {
    "fingerprint": "chrome"
  }
},

"xhttpSettings": {
  "path": "/xxxx",
  "host": "xxxx.xxxx.xxx",
  "mode": "auto",
  "xPaddingBytes": "100-1000",
  "scMaxEachPostBytes": "1000000",
  "scMaxBufferedPosts": 30,
  "scStreamUpServerSecs": "20-80"
}

},

"tag": "inbound-443",

"sniffing": {
"enabled": false,
"destOverride": [
"http",
"tls",
"quic",
"fakedns"
]
}
}`

Expected action

توقع داشتم نهایتا چن مگ کم کنه ن یک گیگ و نیم اصلا سرعت دانلود و اپلودم انقدر ضعیفه نمیتونه در حد چن دقیقه 1 گیگ و نیم دانلود کنه یا اپلود ک حجم اینقدر زده

Received action

{
"id": 1,
"userId": 0,
"up": 0,
"down": 0,
"total": 0,
"allTime": 2155873726,
"remark": "",
"enable": true,
"expiryTime": 0,
"trafficReset": "never",
"lastTrafficResetTime": 1779620130539,
"listen": "",
"port": 443,
"protocol": "vless",
"settings": "{\n "clients": [\n {\n "comment": "",\n "created_at": 1779569448000,\n "email": "ahmadreza",\n "enable": true,\n "expiryTime": 0,\n "flow": "",\n "id": "7c552b9f-1d86-41a1-876d-9d555d7157de",\n "limitIp": 0,\n "reset": 0,\n "subId": "ahmad",\n "tgId": "",\n "totalGB": 5368709120,\n "updated_at": 1779572576000\n }\n ],\n "decryption": "none",\n "encryption": "none"\n}",
"streamSettings": "{"network":"xhttp","security":"tls","externalProxy":[],"tlsSettings":{"serverName":"bb.secrect-domain-sorry.bb","minVersion":"1.0","maxVersion":"1.3","cipherSuites":"","rejectUnknownSni":false,"disableSystemRoot":false,"enableSessionResumption":false,"certificates":[{"certificateFile":"/root/cert/bb.secrect-domain-sorry.bb/fullchain.pem","keyFile":"/root/cert/bb.secrect-domain-sorry.bb/privkey.pem","oneTimeLoading":false,"usage":"encipherment","buildChain":false}],"alpn":["h2","http/1.1"],"echServerKeys":"","settings":{"fingerprint":"chrome","echConfigList":""}},"xhttpSettings":{"path":"/api","host":"bb.secrect-domain-sorry.bb","mode":"auto","xPaddingBytes":"100-1000","xPaddingObfsMode":false,"xPaddingKey":"","xPaddingHeader":"","xPaddingPlacement":"","xPaddingMethod":"","sessionPlacement":"","sessionKey":"","seqPlacement":"","seqKey":"","uplinkDataPlacement":"","uplinkDataKey":"","scMaxEachPostBytes":"1000000","noSSEHeader":false,"scMaxBufferedPosts":30,"scStreamUpServerSecs":"20-80","serverMaxHeaderBytes":0,"headers":{}}}",
"tag": "inbound-443",
"sniffing": "{"enabled":false,"destOverride":["http","tls","quic","fakedns"],"metadataOnly":false,"routeOnly":false}",
"clientStats": [
{
"id": 2,
"inboundId": 1,
"enable": true,
"email": "ahmadreza",
"uuid": "7c552b9f-1d86-41a1-876d-9d555d7157de",
"subId": "ahmad",
"up": 0,
"down": 15794176,
"allTime": 2152961697,
"expiryTime": 0,
"total": 5368709120,
"reset": 0,
"lastOnline": 1779620139003
}
],
"nodeId": null,
"_cachedInbound": {
"port": 443,
"listen": "",
"_protocol": "vless",
"settings": {
"protocol": "vless",
"vlesses": [
{
"email": "ahmadreza",
"limitIp": 0,
"totalGB": 5368709120,
"expiryTime": 0,
"enable": true,
"tgId": "",
"subId": "ahmad",
"comment": "",
"reset": 0,
"created_at": 1779569448000,
"updated_at": 1779572576000,
"id": "7c552b9f-1d86-41a1-876d-9d555d7157de",
"flow": "",
"reverseTag": "",
"reverseSniffing": {
"enabled": false,
"destOverride": [
"http",
"tls",
"quic",
"fakedns"
],
"metadataOnly": false,
"routeOnly": false,
"ipsExcluded": [],
"domainsExcluded": []
}
}
],
"decryption": "none",
"encryption": "none",
"fallbacks": [],
"testseed": []
},
"stream": {
"network": "xhttp",
"security": "tls",
"externalProxy": [],
"tls": {
"sni": "bb.secrect-domain-sorry.bb",
"minVersion": "1.0",
"maxVersion": "1.3",
"cipherSuites": "",
"rejectUnknownSni": false,
"disableSystemRoot": false,
"enableSessionResumption": false,
"certs": [
{
"useFile": true,
"certFile": "/root/cert/bb.secrect-domain-sorry.bb/fullchain.pem",
"keyFile": "/root/cert/bb.secrect-domain-sorry.bb/privkey.pem",
"cert": "",
"key": "",
"oneTimeLoading": false,
"usage": "encipherment",
"buildChain": false
}
],
"alpn": [
"h2",
"http/1.1"
],
"echServerKeys": "",
"settings": {
"fingerprint": "chrome",
"echConfigList": ""
}
},
"reality": {
"show": false,
"xver": 0,
"target": "www.sony.com:443",
"serverNames": "www.sony.com",
"privateKey": "",
"minClientVer": "",
"maxClientVer": "",
"maxTimediff": 0,
"shortIds": "5ada34,06cb,d836796522,085fcfd5386a8b,70accf40c2513de6,dcdef70efdcd,d6,2d5b1b0d",
"mldsa65Seed": "",
"settings": {
"publicKey": "",
"fingerprint": "chrome",
"serverName": "",
"spiderX": "/",
"mldsa65Verify": ""
}
},
"tcp": {
"acceptProxyProtocol": false,
"type": "none",
"request": {
"version": "1.1",
"method": "GET",
"path": [
"/"
],
"headers": []
},
"response": {
"version": "1.1",
"status": "200",
"reason": "OK",
"headers": []
}
},
"kcp": {
"mtu": 1350,
"tti": 20,
"upCap": 5,
"downCap": 20,
"cwndMultiplier": 1,
"maxSendingWindow": 2097152
},
"ws": {
"acceptProxyProtocol": false,
"path": "/",
"host": "",
"headers": [],
"heartbeatPeriod": 0
},
"grpc": {
"serviceName": "",
"authority": "",
"multiMode": false
},
"httpupgrade": {
"acceptProxyProtocol": false,
"path": "/",
"host": "",
"headers": []
},
"xhttp": {
"path": "/api",
"host": "bb.secrect-domain-sorry.bb",
"mode": "auto",
"xPaddingBytes": "100-1000",
"xPaddingObfsMode": false,
"xPaddingKey": "",
"xPaddingHeader": "",
"xPaddingPlacement": "",
"xPaddingMethod": "",
"sessionPlacement": "",
"sessionKey": "",
"seqPlacement": "",
"seqKey": "",
"uplinkDataPlacement": "",
"uplinkDataKey": "",
"scMaxEachPostBytes": "1000000",
"noSSEHeader": false,
"scMaxBufferedPosts": 30,
"scStreamUpServerSecs": "20-80",
"serverMaxHeaderBytes": 0,
"headers": []
},
"hysteria": {
"version": 2,
"auth": "",
"udpIdleTimeout": 60
},
"finalmask": {
"tcp": [],
"udp": []
}
},
"tag": "inbound-443",
"sniffing": {
"enabled": false,
"destOverride": [
"http",
"tls",
"quic",
"fakedns"
],
"metadataOnly": false,
"routeOnly": false,
"ipsExcluded": [],
"domainsExcluded": []
},
"clientStats": [
{
"id": 2,
"inboundId": 1,
"enable": true,
"email": "ahmadreza",
"uuid": "7c552b9f-1d86-41a1-876d-9d555d7157de",
"subId": "ahmad",
"up": 0,
"down": 15794176,
"allTime": 2152961697,
"expiryTime": 0,
"total": 5368709120,
"reset": 0,
"lastOnline": 1779620139003
}
]
}
}

3x-ui Version

3.0.2

Xray-core Version

No response

Checklist

  • This bug report is written entirely in English.
  • This bug report is new and no one has reported it before me.
Originally created by @jazavaja on GitHub (May 24, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4529 ### Describe the bug Hello, I think there might be a bug with traffic accounting in 3x-ui / Xray when using **VLESS + XHTTP + Vercel Relay**. ### Setup * Protocol: **VLESS** * Transport: **XHTTP** * TLS enabled * Relay: **Vercel Relay (XHTTP Installer)** * Panel: **3x-ui (MHSanaei Docker image)** ### Problem Traffic usage shown in the panel appears to be **incorrect or heavily overcounted**. For example: * I only connected briefly for testing and disconnected immediately. * I am **not actively using this VPN**. * My actual internet connection could not possibly upload/download the amount of traffic shown. However, after only a few speed tests (from the Windows client ping/speed option), the panel reports extremely high traffic usage (hundreds of MB or even GB). ### Important note The Windows client speed test shows unrealistic bandwidth values (e.g. ~300 Mbps), while my real connection speed is much lower and cannot realistically transfer that amount of data in such a short time. I also: * reset user traffic statistics, * restarted services, * tested multiple times, but the issue persists. My suspicion is that traffic accounting may be affected by: * **XHTTP protocol**, or * **Vercel Relay / CDN relay behavior**, possibly counting relayed/streamed/chunked traffic incorrectly. Has anyone experienced this issue before, or is this a known limitation/bug with **XHTTP + relay setups**? Thank you. ---------------- <img width="1919" height="248" alt="Image" src="https://github.com/user-attachments/assets/9d2c51e6-b4f1-43bf-a21f-36e479976d01" /> 150 mb just one time speed test in v2rayn client! <img width="1562" height="173" alt="Image" src="https://github.com/user-attachments/assets/901117de-63d0-4b1a-9920-648817912e01" /> ### How to repeat the problem? For privacy and security reasons, I have redacted or replaced sensitive values in the inbound configuration below (domain names, UUIDs, paths, certificate locations, relay details, IPs, and user-specific identifiers). The overall structure and relevant technical settings are preserved for debugging purposes. `{ "id": 1, "enable": true, "port": 443, "protocol": "vless", "settings": { "clients": [ { "email": "user1", "enable": true, "flow": "", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "limitIp": 0, "subId": "xxxx", "totalGB": 5368709120 } ], "decryption": "none", "encryption": "none" }, "streamSettings": { "network": "xhttp", "security": "tls", "tlsSettings": { "serverName": "xxxx.xxxx.xxx", "minVersion": "1.0", "maxVersion": "1.3", "certificates": [ { "certificateFile": "/root/cert/xxxx/fullchain.pem", "keyFile": "/root/cert/xxxx/privkey.pem" } ], "alpn": [ "h2", "http/1.1" ], "settings": { "fingerprint": "chrome" } }, "xhttpSettings": { "path": "/xxxx", "host": "xxxx.xxxx.xxx", "mode": "auto", "xPaddingBytes": "100-1000", "scMaxEachPostBytes": "1000000", "scMaxBufferedPosts": 30, "scStreamUpServerSecs": "20-80" } }, "tag": "inbound-443", "sniffing": { "enabled": false, "destOverride": [ "http", "tls", "quic", "fakedns" ] } }` ### Expected action توقع داشتم نهایتا چن مگ کم کنه ن یک گیگ و نیم اصلا سرعت دانلود و اپلودم انقدر ضعیفه نمیتونه در حد چن دقیقه 1 گیگ و نیم دانلود کنه یا اپلود ک حجم اینقدر زده ### Received action { "id": 1, "userId": 0, "up": 0, "down": 0, "total": 0, "allTime": 2155873726, "remark": "", "enable": true, "expiryTime": 0, "trafficReset": "never", "lastTrafficResetTime": 1779620130539, "listen": "", "port": 443, "protocol": "vless", "settings": "{\n \"clients\": [\n {\n \"comment\": \"\",\n \"created_at\": 1779569448000,\n \"email\": \"ahmadreza\",\n \"enable\": true,\n \"expiryTime\": 0,\n \"flow\": \"\",\n \"id\": \"7c552b9f-1d86-41a1-876d-9d555d7157de\",\n \"limitIp\": 0,\n \"reset\": 0,\n \"subId\": \"ahmad\",\n \"tgId\": \"\",\n \"totalGB\": 5368709120,\n \"updated_at\": 1779572576000\n }\n ],\n \"decryption\": \"none\",\n \"encryption\": \"none\"\n}", "streamSettings": "{\"network\":\"xhttp\",\"security\":\"tls\",\"externalProxy\":[],\"tlsSettings\":{\"serverName\":\"bb.secrect-domain-sorry.bb\",\"minVersion\":\"1.0\",\"maxVersion\":\"1.3\",\"cipherSuites\":\"\",\"rejectUnknownSni\":false,\"disableSystemRoot\":false,\"enableSessionResumption\":false,\"certificates\":[{\"certificateFile\":\"/root/cert/bb.secrect-domain-sorry.bb/fullchain.pem\",\"keyFile\":\"/root/cert/bb.secrect-domain-sorry.bb/privkey.pem\",\"oneTimeLoading\":false,\"usage\":\"encipherment\",\"buildChain\":false}],\"alpn\":[\"h2\",\"http/1.1\"],\"echServerKeys\":\"\",\"settings\":{\"fingerprint\":\"chrome\",\"echConfigList\":\"\"}},\"xhttpSettings\":{\"path\":\"/api\",\"host\":\"bb.secrect-domain-sorry.bb\",\"mode\":\"auto\",\"xPaddingBytes\":\"100-1000\",\"xPaddingObfsMode\":false,\"xPaddingKey\":\"\",\"xPaddingHeader\":\"\",\"xPaddingPlacement\":\"\",\"xPaddingMethod\":\"\",\"sessionPlacement\":\"\",\"sessionKey\":\"\",\"seqPlacement\":\"\",\"seqKey\":\"\",\"uplinkDataPlacement\":\"\",\"uplinkDataKey\":\"\",\"scMaxEachPostBytes\":\"1000000\",\"noSSEHeader\":false,\"scMaxBufferedPosts\":30,\"scStreamUpServerSecs\":\"20-80\",\"serverMaxHeaderBytes\":0,\"headers\":{}}}", "tag": "inbound-443", "sniffing": "{\"enabled\":false,\"destOverride\":[\"http\",\"tls\",\"quic\",\"fakedns\"],\"metadataOnly\":false,\"routeOnly\":false}", "clientStats": [ { "id": 2, "inboundId": 1, "enable": true, "email": "ahmadreza", "uuid": "7c552b9f-1d86-41a1-876d-9d555d7157de", "subId": "ahmad", "up": 0, "down": 15794176, "allTime": 2152961697, "expiryTime": 0, "total": 5368709120, "reset": 0, "lastOnline": 1779620139003 } ], "nodeId": null, "_cachedInbound": { "port": 443, "listen": "", "_protocol": "vless", "settings": { "protocol": "vless", "vlesses": [ { "email": "ahmadreza", "limitIp": 0, "totalGB": 5368709120, "expiryTime": 0, "enable": true, "tgId": "", "subId": "ahmad", "comment": "", "reset": 0, "created_at": 1779569448000, "updated_at": 1779572576000, "id": "7c552b9f-1d86-41a1-876d-9d555d7157de", "flow": "", "reverseTag": "", "reverseSniffing": { "enabled": false, "destOverride": [ "http", "tls", "quic", "fakedns" ], "metadataOnly": false, "routeOnly": false, "ipsExcluded": [], "domainsExcluded": [] } } ], "decryption": "none", "encryption": "none", "fallbacks": [], "testseed": [] }, "stream": { "network": "xhttp", "security": "tls", "externalProxy": [], "tls": { "sni": "bb.secrect-domain-sorry.bb", "minVersion": "1.0", "maxVersion": "1.3", "cipherSuites": "", "rejectUnknownSni": false, "disableSystemRoot": false, "enableSessionResumption": false, "certs": [ { "useFile": true, "certFile": "/root/cert/bb.secrect-domain-sorry.bb/fullchain.pem", "keyFile": "/root/cert/bb.secrect-domain-sorry.bb/privkey.pem", "cert": "", "key": "", "oneTimeLoading": false, "usage": "encipherment", "buildChain": false } ], "alpn": [ "h2", "http/1.1" ], "echServerKeys": "", "settings": { "fingerprint": "chrome", "echConfigList": "" } }, "reality": { "show": false, "xver": 0, "target": "www.sony.com:443", "serverNames": "www.sony.com", "privateKey": "", "minClientVer": "", "maxClientVer": "", "maxTimediff": 0, "shortIds": "5ada34,06cb,d836796522,085fcfd5386a8b,70accf40c2513de6,dcdef70efdcd,d6,2d5b1b0d", "mldsa65Seed": "", "settings": { "publicKey": "", "fingerprint": "chrome", "serverName": "", "spiderX": "/", "mldsa65Verify": "" } }, "tcp": { "acceptProxyProtocol": false, "type": "none", "request": { "version": "1.1", "method": "GET", "path": [ "/" ], "headers": [] }, "response": { "version": "1.1", "status": "200", "reason": "OK", "headers": [] } }, "kcp": { "mtu": 1350, "tti": 20, "upCap": 5, "downCap": 20, "cwndMultiplier": 1, "maxSendingWindow": 2097152 }, "ws": { "acceptProxyProtocol": false, "path": "/", "host": "", "headers": [], "heartbeatPeriod": 0 }, "grpc": { "serviceName": "", "authority": "", "multiMode": false }, "httpupgrade": { "acceptProxyProtocol": false, "path": "/", "host": "", "headers": [] }, "xhttp": { "path": "/api", "host": "bb.secrect-domain-sorry.bb", "mode": "auto", "xPaddingBytes": "100-1000", "xPaddingObfsMode": false, "xPaddingKey": "", "xPaddingHeader": "", "xPaddingPlacement": "", "xPaddingMethod": "", "sessionPlacement": "", "sessionKey": "", "seqPlacement": "", "seqKey": "", "uplinkDataPlacement": "", "uplinkDataKey": "", "scMaxEachPostBytes": "1000000", "noSSEHeader": false, "scMaxBufferedPosts": 30, "scStreamUpServerSecs": "20-80", "serverMaxHeaderBytes": 0, "headers": [] }, "hysteria": { "version": 2, "auth": "", "udpIdleTimeout": 60 }, "finalmask": { "tcp": [], "udp": [] } }, "tag": "inbound-443", "sniffing": { "enabled": false, "destOverride": [ "http", "tls", "quic", "fakedns" ], "metadataOnly": false, "routeOnly": false, "ipsExcluded": [], "domainsExcluded": [] }, "clientStats": [ { "id": 2, "inboundId": 1, "enable": true, "email": "ahmadreza", "uuid": "7c552b9f-1d86-41a1-876d-9d555d7157de", "subId": "ahmad", "up": 0, "down": 15794176, "allTime": 2152961697, "expiryTime": 0, "total": 5368709120, "reset": 0, "lastOnline": 1779620139003 } ] } } ### 3x-ui Version 3.0.2 ### Xray-core Version _No response_ ### Checklist - [x] This bug report is written entirely in English. - [x] This bug report is new and no one has reported it before me.
bsakaguchi 2026-10-31 20:30:04 +07:00
  • closed this issue
  • added the
    bug
    label
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#3098
No description provided.