[GH-ISSUE #3713] Trojan: enable flag not propagated to clientStats when updating client via API #2499

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

Originally created by @fslandi on GitHub (Jan 28, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3713

Describe the bug

When updating Trojan clients via the API (POST update client) with "enable": true, the flag is applied in settings but does not update clientStats.

Screenshots attached show that after the API call, settings.enable changes but clientStats remains unchanged.

Image Image

For VLESS clients, the same API call updates both settings.enable and clientStats correctly.

This seems specific to Trojan protocol clients.

How to repeat the problem?

  1. Create or identify a Trojan client in 3x-ui whose duration has expired.
  2. Use the API endpoint (POST update client for Trojan) with a payload containing '"enable": true' to re-enable or extend the key.
  3. Check the inbound JSON or export the inbound.

Expected action

No response

Received action

No response

3x-ui Version

2.8.8

Xray-core Version

2

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 @fslandi on GitHub (Jan 28, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3713 ### Describe the bug When updating Trojan clients via the API (POST update client) with "enable": true, the flag is applied in settings but does not update clientStats. Screenshots attached show that after the API call, settings.enable changes but clientStats remains unchanged. <img width="295" height="295" alt="Image" src="https://github.com/user-attachments/assets/aafd9086-b646-48d1-8642-1d84f28f4c84" /> <img width="511" height="523" alt="Image" src="https://github.com/user-attachments/assets/c6d41c38-93b7-4d29-a6ea-c13fbc0ecf9f" /> For VLESS clients, the same API call updates both settings.enable and clientStats correctly. This seems specific to Trojan protocol clients. ### How to repeat the problem? 1. Create or identify a Trojan client in 3x-ui whose duration has expired. 2. Use the API endpoint (POST update client for Trojan) with a payload containing '"enable": true' to re-enable or extend the key. 3. Check the inbound JSON or export the inbound. ### Expected action _No response_ ### Received action _No response_ ### 3x-ui Version 2.8.8 ### Xray-core Version 2 ### 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:25:56 +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#2499
No description provided.