[GH-ISSUE #2691] Does not work clientStats update over API (Update inbound). #1789

Closed
opened 2026-10-31 20:21:07 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @h963z57 on GitHub (Mar 1, 2025).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/2691

Describe the bug
I'm using API for control my users.
panel/api/inbounds/update/{inboundId}

{
  "id": {{ item.id }},
  "userId": 0,
  "up": {{ item.up }},
  "down": {{ item.down }},
  "total": {{ item.total }},
  "remark": "{{ item.name }}",
  "enable": true,
  "expiryTime": 0,
  "listen": "",
  "port": {{ item.port }},
  "protocol": "vless",
  "settings": "{\n  \"clients\": [\n    {% for client in item.clients %} {\n      \"email\": \"{{ client.email }}\",\n      \"enable\": {{ client.enabled }},\n      \"expiryTime\": {{ client.expiryTime }},\n      \"flow\": \"xtls-rprx-vision\",\n      \"id\": \"{{ client.id }}\",\n      \"limitIp\": 1,\n      \"reset\": 0,\n      \"subId\": \"{{ client.id }}\",\n      \"tgId\": \"{{ client.tgid }}\",\n      \"totalGB\": {{ client.totalGB * 1073741824 }}\n    }\n {% if not loop.last %},{% endif %} {% endfor %}  ],\n \"decryption\": \"none\",\n  \"fallbacks\": []\n}",
  "streamSettings": "{\n  \"network\": \"tcp\",\n  \"security\": \"reality\",\n  \"externalProxy\": [\n  {% for region in item.regions %}  {\n      \"forceTls\": \"same\",\n      \"dest\": \"{{ region.host }}\",\n      \"port\": {{ item.port }},\n      \"remark\": \"{{ region.remark }}\"\n    }{% if not loop.last %},{% endif %} {% endfor %} \n  ],\n  \"realitySettings\": {\n    \"show\": false,\n    \"xver\": 0,\n    \"dest\": \"youtube.com:443\",\n    \"serverNames\": [\n      \"youtube.com\",\n      \"www.youtube.com\"\n    ],\n    \"privateKey\": \"{{ item.privateKey }}\",\n    \"minClient\": \"\",\n    \"maxClient\": \"\",\n    \"maxTimediff\": 0,\n    \"shortIds\": [\n      \"{{ item.shortID }}\"\n    ],\n    \"settings\": {\n      \"publicKey\": \"{{ item.publicKey }}\",\n      \"fingerprint\": \"chrome\",\n      \"serverName\": \"\",\n      \"spiderX\": \"/\"\n    }\n  },\n  \"tcpSettings\": {\n    \"acceptProxyProtocol\": false,\n    \"header\": {\n      \"type\": \"none\"\n    }\n  }\n}",
  "tag": "inbound-{{ item.port }}",
  "sniffing": "{\n  \"enabled\": true,\n  \"destOverride\": [\n    \"http\",\n    \"tls\",\n    \"quic\",\n    \"fakedns\"\n  ],\n  \"metadataOnly\": false,\n  \"routeOnly\": false\n}"
}

If i add month to current date it does't work. I have to into GUI manually press "Save changes" (without changes). Therefor new date is applied.

Expected behavior
No need to press "Save changes" into GUI

Version (please complete the following information):

  • Docker container v2.4.3 (and 2.5.0)
Originally created by @h963z57 on GitHub (Mar 1, 2025). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/2691 **Describe the bug** I'm using API for control my users. ```panel/api/inbounds/update/{inboundId}``` ``` { "id": {{ item.id }}, "userId": 0, "up": {{ item.up }}, "down": {{ item.down }}, "total": {{ item.total }}, "remark": "{{ item.name }}", "enable": true, "expiryTime": 0, "listen": "", "port": {{ item.port }}, "protocol": "vless", "settings": "{\n \"clients\": [\n {% for client in item.clients %} {\n \"email\": \"{{ client.email }}\",\n \"enable\": {{ client.enabled }},\n \"expiryTime\": {{ client.expiryTime }},\n \"flow\": \"xtls-rprx-vision\",\n \"id\": \"{{ client.id }}\",\n \"limitIp\": 1,\n \"reset\": 0,\n \"subId\": \"{{ client.id }}\",\n \"tgId\": \"{{ client.tgid }}\",\n \"totalGB\": {{ client.totalGB * 1073741824 }}\n }\n {% if not loop.last %},{% endif %} {% endfor %} ],\n \"decryption\": \"none\",\n \"fallbacks\": []\n}", "streamSettings": "{\n \"network\": \"tcp\",\n \"security\": \"reality\",\n \"externalProxy\": [\n {% for region in item.regions %} {\n \"forceTls\": \"same\",\n \"dest\": \"{{ region.host }}\",\n \"port\": {{ item.port }},\n \"remark\": \"{{ region.remark }}\"\n }{% if not loop.last %},{% endif %} {% endfor %} \n ],\n \"realitySettings\": {\n \"show\": false,\n \"xver\": 0,\n \"dest\": \"youtube.com:443\",\n \"serverNames\": [\n \"youtube.com\",\n \"www.youtube.com\"\n ],\n \"privateKey\": \"{{ item.privateKey }}\",\n \"minClient\": \"\",\n \"maxClient\": \"\",\n \"maxTimediff\": 0,\n \"shortIds\": [\n \"{{ item.shortID }}\"\n ],\n \"settings\": {\n \"publicKey\": \"{{ item.publicKey }}\",\n \"fingerprint\": \"chrome\",\n \"serverName\": \"\",\n \"spiderX\": \"/\"\n }\n },\n \"tcpSettings\": {\n \"acceptProxyProtocol\": false,\n \"header\": {\n \"type\": \"none\"\n }\n }\n}", "tag": "inbound-{{ item.port }}", "sniffing": "{\n \"enabled\": true,\n \"destOverride\": [\n \"http\",\n \"tls\",\n \"quic\",\n \"fakedns\"\n ],\n \"metadataOnly\": false,\n \"routeOnly\": false\n}" } ``` If i add month to current date it does't work. I have to into GUI manually press "Save changes" (without changes). Therefor new date is applied. **Expected behavior** No need to press "Save changes" into GUI **Version (please complete the following information):** - Docker container v2.4.3 (and 2.5.0)
bsakaguchi 2026-10-31 20:21:07 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@MHSanaei commented on GitHub (Mar 11, 2025):

/updateClient/:clientId

<!-- gh-comment-id:2714946577 --> @MHSanaei commented on GitHub (Mar 11, 2025): /updateClient/:clientId
Author
Owner

@h963z57 commented on GitHub (Mar 11, 2025):

@MHSanaei without data? just get or post request?

<!-- gh-comment-id:2714988741 --> @h963z57 commented on GitHub (Mar 11, 2025): @MHSanaei without data? just get or post request?
Author
Owner
<!-- gh-comment-id:2715052530 --> @MHSanaei commented on GitHub (Mar 11, 2025): https://www.postman.com/hsanaei/3x-ui/collection/q1l5l0u/3x-ui
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#1789
No description provided.