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
2026-06-20 10:54:26 +02:00
parent 6a032bcb2a
commit 6d9fd4b41b
17 changed files with 95 additions and 46 deletions
+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",
+1 -1
View File
@@ -1761,7 +1761,7 @@
"time": "زمان و وضعیت"
},
"descEMAIL": "ایمیل کاربر",
"descINBOUND": "نام کانفیگ: نام میزبان در صورت تنظیم، در غیر این صورت نام اینباند",
"descINBOUND": "نام خود اینباند (نام کانفیگ)",
"descHOST": "نام میزبان",
"descID": "UUID کاربر",
"descSHORT_ID": "۸ کاراکتر اول UUID",
+1 -1
View File
@@ -1761,7 +1761,7 @@
"time": "Waktu & status"
},
"descEMAIL": "Email klien",
"descINBOUND": "Nama konfigurasi: catatan host bila diatur, jika tidak catatan inbound",
"descINBOUND": "Catatan inbound itu sendiri (nama konfigurasi)",
"descHOST": "Catatan host",
"descID": "UUID klien",
"descSHORT_ID": "8 karakter pertama dari UUID",
+1 -1
View File
@@ -1761,7 +1761,7 @@
"time": "時刻とステータス"
},
"descEMAIL": "クライアントのメール",
"descINBOUND": "設定名: ホストの備考が設定されている場合はそれ、それ以外はインバウンドの備考",
"descINBOUND": "インバウンド自身の備考(設定名)",
"descHOST": "ホストの備考",
"descID": "クライアント UUID",
"descSHORT_ID": "UUID の最初の 8 文字",
+1 -1
View File
@@ -1761,7 +1761,7 @@
"time": "Tempo e status"
},
"descEMAIL": "Email do cliente",
"descINBOUND": "Nome da configuração: a observação do host quando definida, caso contrário a observação da entrada",
"descINBOUND": "Observação da própria entrada (nome da configuração)",
"descHOST": "Observação do host",
"descID": "UUID do cliente",
"descSHORT_ID": "Primeiros 8 caracteres do UUID",
+1 -1
View File
@@ -1761,7 +1761,7 @@
"time": "Время и статус"
},
"descEMAIL": "Email клиента",
"descINBOUND": "Имя конфигурации: примечание хоста, если задано, иначе примечание входящего",
"descINBOUND": "Собственное примечание входящего (имя конфигурации)",
"descHOST": "Примечание хоста",
"descID": "UUID клиента",
"descSHORT_ID": "Первые 8 символов UUID",
+1 -1
View File
@@ -1761,7 +1761,7 @@
"time": "Zaman ve durum"
},
"descEMAIL": "Kullanıcı e-postası",
"descINBOUND": "Yapılandırma adı: ayarlanmışsa host'un açıklaması, aksi halde gelen bağlantının açıklaması",
"descINBOUND": "Gelen bağlantının kendi açıklaması (yapılandırma adı)",
"descHOST": "Host açıklaması",
"descID": "Kullanıcı UUID'si",
"descSHORT_ID": "UUID'nin ilk 8 karakteri",
+1 -1
View File
@@ -1761,7 +1761,7 @@
"time": "Час і статус"
},
"descEMAIL": "Email клієнта",
"descINBOUND": "Назва конфігурації: примітка хоста, якщо задана, інакше примітка вхідного",
"descINBOUND": "Власна примітка вхідного (назва конфігурації)",
"descHOST": "Примітка хоста",
"descID": "UUID клієнта",
"descSHORT_ID": "Перші 8 символів UUID",
+1 -1
View File
@@ -1761,7 +1761,7 @@
"time": "Thời gian & trạng thái"
},
"descEMAIL": "Email khách hàng",
"descINBOUND": "Tên cấu hình: ghi chú của host nếu được đặt, nếu không thì ghi chú của inbound",
"descINBOUND": "Ghi chú của chính inbound (tên cấu hình)",
"descHOST": "Ghi chú host",
"descID": "UUID khách hàng",
"descSHORT_ID": "8 ký tự đầu của UUID",
+1 -1
View File
@@ -1761,7 +1761,7 @@
"time": "时间与状态"
},
"descEMAIL": "客户端邮箱",
"descINBOUND": "配置名称:已设置时为主机的备注,否则为入站的备注",
"descINBOUND": "入站本身的备注(配置名称)",
"descHOST": "主机备注",
"descID": "客户端 UUID",
"descSHORT_ID": "UUID 的前 8 个字符",
+1 -1
View File
@@ -1761,7 +1761,7 @@
"time": "時間與狀態"
},
"descEMAIL": "客戶端電子郵件",
"descINBOUND": "配置名稱:設定時為 Host 的備註,否則為入站的備註",
"descINBOUND": "入站本身的備註(配置名稱)",
"descHOST": "Host 備註",
"descID": "客戶端 UUID",
"descSHORT_ID": "UUID 的前 8 個字元",