mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #3248] Question : API #2201
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#2201
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 @Golden-Source on GitHub (Jul 18, 2025).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3248
Question
Hello,
We plan to develop an API for the panel, but we face an issue: if we consider one inbound with multiple users, the output does not provide the consumption details for each user.
{
"success": true,
"msg": "",
"obj": {
"id": 1,
"up": 20930403009,
"down": 282122465782,
"total": 0,
"remark": "saeed",
"enable": true,
"expiryTime": 0,
"clientStats": null,
"listen": "",
"port": 12827,
"protocol": "vless",
"settings": "{\n "clients": [\n {\n "comment": "",\n "email": "ialc5fk1",\n "enable": true,\n "expiryTime": 0,\n "flow": "",\n "id": "0c0d65a1-3353-42a6-8534-8ae0fb8d42b9",\n "limitIp": 0,\n "reset": 0,\n "subId": "xpwqdshdkuhdb64b",\n "tgId": "",\n "totalGB": 0\n },\n {\n "comment": "",\n "email": "dorsa",\n "enable": true,\n "expiryTime": 0,\n "flow": "",\n "id": "4bd38d15-ceed-4482-b2b8-799f63c71ec7",\n "limitIp": 0,\n "reset": 0,\n "subId": "h3ex1ygjzotjwy8h",\n "tgId": "",\n "totalGB": 10737418240\n },\n {\n "comment": "",\n "email": "amir",\n "enable": true,\n "expiryTime": 0,\n "flow": "",\n "id": "bebe8f4a-f229-4ff9-8b1c-32d7bae4a93f",\n "limitIp": 0,\n "reset": 0,\n "subId": "r9pwf5qgnxggxh90",\n "tgId": "",\n "totalGB": 0\n },\n {\n "comment": "",\n "email": "dr4co8o3",\n "enable": true,\n "expiryTime": 1753865705000,\n "flow": "",\n "id": "6c286f4e-a18e-4cb6-91bf-2df24e0b5eb6",\n "limitIp": 0,\n "reset": 0,\n "subId": "5tfo80gz3vbcc9dy",\n "tgId": "",\n "totalGB": 21474836480\n }\n ],\n "decryption": "none",\n "fallbacks": []\n}",
"streamSettings": "{\n "network": "tcp",\n "security": "none",\n "externalProxy": [],\n "tcpSettings": {\n "acceptProxyProtocol": false,\n "header": {\n "type": "none"\n }\n }\n}",
"tag": "inbound-12827",
"sniffing": "{\n "enabled": false,\n "destOverride": [\n "http",\n "tls",\n "quic",\n "fakedns"\n ],\n "metadataOnly": false,\n "routeOnly": false\n}",
"allocate": "{\n "strategy": "always",\n "refresh": 5,\n "concurrency": 3\n}"
}
}
If we have around 500 users, we encounter request limit issues. How can we resolve this?
Additionally, while creating a user for VLESS requires sending data in JSON format, how should an inbound for WireGuard be created?
Checklist
@4rrowSwift commented on GitHub (Jul 29, 2025):
столкнулся с такой же проблемой, мне необходим clientStats в /panel/api/inbounds/get/{inboundId}
@batonogov commented on GitHub (Apr 27, 2026):
Если
clientStatsв/panel/api/inbounds/listили/panel/api/inbounds/get/:idприходитnull— он действительно заполняется не всегда. Стабильно работает другой эндпоинт:/panel/api/inbounds/getClientTraffics/:email— он возвращает up/down/total по конкретному клиенту.Если строишь своё API поверх 3x-ui — можно подсмотреть реализацию на Go:
Client.GetClientTrafficsByEmailв моём Terraform-провайдере для 3x-ui: https://github.com/batonogov/terraform-provider-threexui/blob/main/provider/client.go