mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-20 03:26:08 +00:00
* feat(nodes): add stable panel GUID identity (multi-hop phase 0) Per-panel autoincrement node ids are meaningless one hop away, so in a chained topology (Node1 -> Node2 -> Node3) the master cannot attribute online clients or inbounds to the physical node that hosts them (#4983). Introduce a stable self-identifier: each panel generates and persists a panelGuid (settings table, mirroring GetSecret), returns it in panel/api/server/status, and the master learns it per node via the heartbeat into a new Node.Guid column. Guarded so an old-build node or a failed probe never clears a known GUID. No behavior change yet - this is the identity foundation Phases 1-2 key on. Refs #4983 * feat(nodes): attribute inbounds to their origin node by GUID (multi-hop phase 1) Add Inbound.OriginNodeGuid: the GUID of the panel that physically hosts an inbound. Empty means this panel's own xray; set means it was synced from a node. SetRemoteTraffic now fills it per synced inbound - keeping a non-empty value the node forwarded from its own sub-node (so a transitive inbound stays attributed to the deepest node across hops), and otherwise attributing the node's own local inbounds to that node's GUID. Empty (old-build node without a GUID) leaves the existing node_id-based attribution untouched. The field rides the existing inbound JSON, so /list propagates it up the chain with no serve-side change. Phase 2 will key per-node online off this instead of the panel-local node_id. Refs #4983 * feat(nodes): key online status by node GUID end-to-end (multi-hop phase 2) Replace the panel-local node-id keying of per-node online status with the stable panelGuid, so a client several hops down a node chain is attributed to the node that physically hosts it instead of the intermediate node it syncs through (#4983). xray/process.go stores each direct node's reported GUID-keyed subtree and merges them (correct at any depth); the service assembles GetOnlineClientsByGuid (own clients under this panel's GUID + every node under its GUID). FetchTrafficSnapshot fetches the new /clients/onlinesByGuid, falling back to the flat /onlines for old-build nodes (keyed under the node's GUID or a master-local synthetic id). The node rollup, the WS onlineByGuid/activeInbounds fields, and the inbounds-page rollup all scope by GUID; local inbounds get their OriginNodeGuid filled with the panel's GUID at serve time so the frontend keys uniformly. Old-build nodes degrade to the prior flat behaviour via the synthetic node:<id> key. Refs #4983 Refs #4983 * feat(nodes): surface transitive sub-nodes on the master (multi-hop phase 3a) Each panel publishes read-only summaries of the nodes it manages via GET /panel/api/server/descendants (node API token). The heartbeat job caches each direct node's summaries; GetNodeTree merges them as transitive model.Node projections (Id 0, Transitive=true, ParentGuid = their parent node's GUID) and recomputes InboundCount/OnlineCount/DepletedCount per origin GUID so a direct node shows only its own inbounds and each sub-node shows its own (#4983). The Nodes-page list endpoint and the heartbeat broadcast now return the tree; GetAll stays direct-only for probing/syncing. One transitive level is surfaced (covers Node1->Node2->Node3); deeper recursion is a follow-up. Backend only - the Nodes-page nested UI lands next. Refs #4983 * feat(nodes): render transitive sub-nodes nested + read-only on the Nodes page (multi-hop phase 3b) The Nodes page now shows a node's downstream sub-nodes (learned via the descendants tree) as indented, read-only rows ordered right under their parent: no enable toggle, probe, edit, delete, update, selection, or history expander - just a 'Sub-node' tag whose tooltip names the parent it is reached through. Desktop table and mobile cards both handle it. Transitive rows are keyed by GUID (their Id is 0) so they don't collide with real nodes (#4983). Rows nest by parentGuid rather than AntD tree-children to avoid clashing with the existing per-row history expander. New labels added to en-US (other locales fall back until translated). Refs #4983 Refs #4983 * i18n(nodes): translate subNode/subNodeTip across all locales Phase 3b added these two Nodes-page keys (read-only sub-node tag + tooltip) only to en-US; fill in the other 12 locales so the multi-hop sub-node UI is fully localized. The {parent} placeholder is preserved in every translation. Refs #4983
This commit is contained in:
@@ -881,6 +881,8 @@
|
||||
"connectionFailed": "فشل الاتصال",
|
||||
"never": "أبدًا",
|
||||
"justNow": "دلوقتي",
|
||||
"subNode": "نود فرعي",
|
||||
"subNodeTip": "للقراءة فقط: نود تابع يتم الوصول إليه عبر {parent}. تتم إدارته من لوحة {parent} نفسها.",
|
||||
"deleteConfirmTitle": "تحذف النود \"{name}\"؟",
|
||||
"deleteConfirmContent": "ده هيوقّف مراقبة النود. البانل البعيد نفسه مش هيتأثر.",
|
||||
"statusValues": {
|
||||
|
||||
@@ -887,6 +887,8 @@
|
||||
"connectionFailed": "Connection failed",
|
||||
"never": "never",
|
||||
"justNow": "just now",
|
||||
"subNode": "Sub-node",
|
||||
"subNodeTip": "Read-only: a downstream node reached through {parent}. Manage it from {parent}'s own panel.",
|
||||
"deleteConfirmTitle": "Delete node \"{name}\"?",
|
||||
"deleteConfirmContent": "This stops monitoring the node. The remote panel itself is unaffected.",
|
||||
"statusValues": {
|
||||
|
||||
@@ -881,6 +881,8 @@
|
||||
"connectionFailed": "Conexión fallida",
|
||||
"never": "nunca",
|
||||
"justNow": "ahora mismo",
|
||||
"subNode": "Subnodo",
|
||||
"subNodeTip": "Solo lectura: un nodo descendente al que se llega a través de {parent}. Gestiónalo desde el propio panel de {parent}.",
|
||||
"deleteConfirmTitle": "¿Eliminar el nodo \"{name}\"?",
|
||||
"deleteConfirmContent": "Esto detiene la monitorización del nodo. El panel remoto en sí no se ve afectado.",
|
||||
"statusValues": {
|
||||
|
||||
@@ -881,6 +881,8 @@
|
||||
"connectionFailed": "اتصال ناموفق",
|
||||
"never": "هرگز",
|
||||
"justNow": "هماکنون",
|
||||
"subNode": "نود فرعی",
|
||||
"subNodeTip": "فقطخواندنی: یک نود پاییندستی که از طریق {parent} در دسترس است. آن را از پنل خودِ {parent} مدیریت کنید.",
|
||||
"deleteConfirmTitle": "نود «{name}» حذف شود؟",
|
||||
"deleteConfirmContent": "نظارت روی این نود متوقف میشود. خود پنل ریموت تغییری نمیکند.",
|
||||
"statusValues": {
|
||||
|
||||
@@ -881,6 +881,8 @@
|
||||
"connectionFailed": "Koneksi gagal",
|
||||
"never": "tidak pernah",
|
||||
"justNow": "baru saja",
|
||||
"subNode": "Sub-node",
|
||||
"subNodeTip": "Hanya-baca: node turunan yang dijangkau melalui {parent}. Kelola dari panel {parent} sendiri.",
|
||||
"deleteConfirmTitle": "Hapus node \"{name}\"?",
|
||||
"deleteConfirmContent": "Ini menghentikan pemantauan node. Panel jarak jauh itu sendiri tidak terpengaruh.",
|
||||
"statusValues": {
|
||||
|
||||
@@ -881,6 +881,8 @@
|
||||
"connectionFailed": "接続に失敗しました",
|
||||
"never": "なし",
|
||||
"justNow": "たった今",
|
||||
"subNode": "サブノード",
|
||||
"subNodeTip": "読み取り専用: {parent} を経由して到達する下位ノードです。{parent} 自身のパネルから管理してください。",
|
||||
"deleteConfirmTitle": "ノード「{name}」を削除しますか?",
|
||||
"deleteConfirmContent": "ノードの監視を停止します。リモートパネル自体には影響しません。",
|
||||
"statusValues": {
|
||||
|
||||
@@ -881,6 +881,8 @@
|
||||
"connectionFailed": "Falha na conexão",
|
||||
"never": "nunca",
|
||||
"justNow": "agora mesmo",
|
||||
"subNode": "Subnó",
|
||||
"subNodeTip": "Somente leitura: um nó descendente acessado através de {parent}. Gerencie-o pelo próprio painel de {parent}.",
|
||||
"deleteConfirmTitle": "Excluir o nó \"{name}\"?",
|
||||
"deleteConfirmContent": "Isso interrompe o monitoramento do nó. O painel remoto em si não é afetado.",
|
||||
"statusValues": {
|
||||
|
||||
@@ -881,6 +881,8 @@
|
||||
"connectionFailed": "Не удалось подключиться",
|
||||
"never": "никогда",
|
||||
"justNow": "только что",
|
||||
"subNode": "Подузел",
|
||||
"subNodeTip": "Только для чтения: подчинённый узел, доступный через {parent}. Управляйте им из собственной панели {parent}.",
|
||||
"deleteConfirmTitle": "Удалить узел \"{name}\"?",
|
||||
"deleteConfirmContent": "Это остановит мониторинг узла. Сама удалённая панель не будет затронута.",
|
||||
"statusValues": {
|
||||
|
||||
@@ -881,6 +881,8 @@
|
||||
"connectionFailed": "Bağlantı başarısız",
|
||||
"never": "asla",
|
||||
"justNow": "şimdi",
|
||||
"subNode": "Alt düğüm",
|
||||
"subNodeTip": "Salt okunur: {parent} üzerinden erişilen bir alt düğüm. Bunu {parent} panelinden yönetin.",
|
||||
"deleteConfirmTitle": "\"{name}\" düğümü silinsin mi?",
|
||||
"deleteConfirmContent": "Bu, düğüm izlemeyi durdurur. Uzak panelin kendisi etkilenmez.",
|
||||
"statusValues": {
|
||||
|
||||
@@ -881,6 +881,8 @@
|
||||
"connectionFailed": "Помилка з'єднання",
|
||||
"never": "ніколи",
|
||||
"justNow": "щойно",
|
||||
"subNode": "Підвузол",
|
||||
"subNodeTip": "Лише для читання: підлеглий вузол, доступний через {parent}. Керуйте ним із власної панелі {parent}.",
|
||||
"deleteConfirmTitle": "Видалити вузол \"{name}\"?",
|
||||
"deleteConfirmContent": "Це зупинить моніторинг вузла. Сама віддалена панель не зазнає змін.",
|
||||
"statusValues": {
|
||||
|
||||
@@ -881,6 +881,8 @@
|
||||
"connectionFailed": "Kết nối thất bại",
|
||||
"never": "chưa bao giờ",
|
||||
"justNow": "vừa xong",
|
||||
"subNode": "Nút con",
|
||||
"subNodeTip": "Chỉ đọc: một nút phía dưới được kết nối qua {parent}. Quản lý nó từ bảng điều khiển của chính {parent}.",
|
||||
"deleteConfirmTitle": "Xóa nút \"{name}\"?",
|
||||
"deleteConfirmContent": "Việc này dừng giám sát nút. Panel từ xa không bị ảnh hưởng.",
|
||||
"statusValues": {
|
||||
|
||||
@@ -881,6 +881,8 @@
|
||||
"connectionFailed": "连接失败",
|
||||
"never": "从未",
|
||||
"justNow": "刚刚",
|
||||
"subNode": "子节点",
|
||||
"subNodeTip": "只读:通过 {parent} 接入的下游节点。请在 {parent} 自己的面板中管理。",
|
||||
"deleteConfirmTitle": "删除节点 \"{name}\"?",
|
||||
"deleteConfirmContent": "这将停止监控该节点。远程面板本身不受影响。",
|
||||
"statusValues": {
|
||||
|
||||
@@ -881,6 +881,8 @@
|
||||
"connectionFailed": "連線失敗",
|
||||
"never": "從未",
|
||||
"justNow": "剛剛",
|
||||
"subNode": "子節點",
|
||||
"subNodeTip": "唯讀:透過 {parent} 連接的下游節點。請在 {parent} 自己的面板中管理。",
|
||||
"deleteConfirmTitle": "刪除節點「{name}」?",
|
||||
"deleteConfirmContent": "這將停止監控該節點。遠端面板本身不受影響。",
|
||||
"statusValues": {
|
||||
|
||||
Reference in New Issue
Block a user