fix(sub): {{INBOUND}} = inbound remark, fix {{TRAFFIC_LEFT}} across inbounds (#5443)

Issue 1: the host endpoint remark no longer substitutes the inbound remark
as the config name. {{INBOUND}} always resolves to the inbound's own remark
and {{HOST}} to the host remark, so both can be shown side by side instead
of the host name appearing twice. configName() drops hostRemark entirely;
token help text updated in all locales.

Issue 2: client_traffics.email is globally unique, so a client shared across
several inbounds of one subscription has a single traffic row owned by one
inbound. statsForClient only searched the current inbound's preloaded
ClientStats, missing on every other inbound's link and falling back to
Up=Down=0 -- so {{TRAFFIC_LEFT}} printed the full quota. Build a per-request
email->stats map from all the subscription's inbounds (no extra queries) and
fall back to it.
This commit is contained in:
MHSanaei committed 2026-06-20 10:54:26 +02:00
1 parent 6a032bcb2a
commit 6d9fd4b41b
17 files changed
+95 -46

No files matched your search

+1 -1
View File
@@ -1761,7 +1761,7 @@
"time": "الوقت والحالة"
},
"descEMAIL": "بريد العميل",
"descINBOUND": "اسم الإعداد: ملاحظة المضيف عند تعيينها، وإلا ملاحظة الوارد",
"descINBOUND": "ملاحظة الوارد نفسه (اسم الإعداد)",
"descHOST": "ملاحظة المضيف",
"descID": "UUID العميل",
"descSHORT_ID": "أول 8 أحرف من الـ UUID",
+1 -1
View File
@@ -951,7 +951,7 @@
"time": "Time & status"
},
"descEMAIL": "Client email",
"descINBOUND": "Config name: the host's remark when set, otherwise the inbound's remark",
"descINBOUND": "Inbound's own remark (the config name)",
"descHOST": "Host remark",
"descID": "Client UUID",
"descSHORT_ID": "First 8 characters of the UUID",
+1 -1
View File
@@ -1761,7 +1761,7 @@
"time": "Tiempo y estado"
},
"descEMAIL": "Email del cliente",
"descINBOUND": "Nombre de la configuración: las notas del host cuando están definidas, de lo contrario las notas del inbound",
"descINBOUND": "Notas del propio inbound (nombre de la configuración)",
"descHOST": "Notas del host",
"descID": "UUID del cliente",
"descSHORT_ID": "Primeros 8 caracteres del UUID",
Loaded 3 of 17 files, more files were not shown because too many files have changed in this diff. Show more