fix: inbound edit validation failure and legacy copy to clipboard (#5132)

* fix: auto-enable clients when resetting traffic

When a client's traffic is exhausted, the panel automatically disables the client and pushes enable: false to the nodes. However, when an admin clicked 'Reset Traffic' or used bulk reset, the counters were zeroed but the client was left disabled. This forced administrators to manually re-enable the client across the central panel and remote nodes.

This patch updates ResetTrafficByEmail and BulkResetTraffic to automatically set Enable: true for any previously disabled client and push the updated settings to nodes, ensuring the client is instantly restored upon traffic reset.

* fix: inbound edit validation failure and legacy copy to clipboard
This commit is contained in:
Rouzbeh†
2026-06-09 15:55:55 +02:00
committed by GitHub
parent 2969f6e91d
commit fe62c39a53
15 changed files with 69 additions and 46 deletions
@@ -129,6 +129,7 @@ exports[`createDefaultVlessClient > produces a Zod-valid client 1`] = `
exports[`createDefaultVmessClient > produces a Zod-valid client 1`] = `
{
"alterId": 0,
"comment": "",
"email": "fixture@example.test",
"enable": true,
@@ -505,6 +505,7 @@ exports[`InboundSchema (full) fixtures > parses vmess-tcp-tls byte-stably 1`] =
"settings": {
"clients": [
{
"alterId": 0,
"comment": "",
"email": "carol@example.test",
"enable": true,
@@ -185,6 +185,7 @@ exports[`InboundSettingsSchema fixtures > parses vmess-basic byte-stably 1`] = `
"settings": {
"clients": [
{
"alterId": 0,
"comment": "primary tester",
"email": "bob@example.test",
"enable": true,