[GH-ISSUE #6280] [Bug]: Remote-only client's lastOnline stays stale on master while real-time online status is correct #4263

Closed
opened 2026-10-31 20:38:22 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @gaojiefengxswhuhit on GitHub (Aug 21, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6280

Describe the bug

In a multi-node setup, a client that is assigned only to remote-node inbounds can be detected as online by the master panel, but the same client's lastOnline and traffic row on the master remain stale.

The remote node itself has the correct, newer lastOnline, so the inconsistency exists inside 3x-ui's multi-node synchronization rather than in an external UI.

This became visible after changing an existing client from local/remote inbound assignments to remote-only inbound assignments.

Environment

  • 3x-ui: 3.6.0 on master and remote nodes
  • Xray-core: 26.7.28
  • Database: SQLite
  • Installation: install.sh
  • Multi-node setup: master panel + several managed remote nodes
  • Affected client: redacted below as clientA

Observed behavior

At the time of reproduction:

  1. clientA was assigned only to two remote-node inbounds.
  2. The remote node was online and its API was reachable normally.
  3. While clientA was connected, the master could report it as currently online.
  4. After disconnecting, the master's lastOnline immediately fell back to an old timestamp from the previous day.
  5. Querying the remote node directly showed a current lastOnline from the connection that had just happened.

Example (timestamps are real observations, identifiers are redacted):

Master client_traffics:

email    up       down      last_online
clientA  3340478  14927787  2026-08-20 19:05:46 +08:00

Remote node /panel/api/inbounds/list:

email: clientA
up: 1370078
down: 7014422
lastOnline: 2026-08-21 20:46:01 +08:00

So the remote node knows the client was online recently, while the master's stored last_online is still about a day old.

The master API also returns the same stale lastOnline in the remote-backed inbound's clientStats.

Additional clue

On the master, node_client_traffics contains baseline rows for other clients on the affected remote node, but no row for clientA on that node, even though the remote node's /panel/api/inbounds/list includes clientA with current traffic and lastOnline.

There were no node traffic sync, lastOnline, or online-fetch warnings in the master logs during the reproduction window, and the remote node heartbeat/status was healthy.

How to reproduce the problem

This is the sequence that exposed it in my setup:

  1. Create a client on the master and use it normally.
  2. Initially assign it to a local inbound and/or another node inbound, so it already has an existing client_traffics row.
  3. Change the client's allowed inbounds so that it is now assigned only to remote managed-node inbounds.
  4. Connect through one of those remote inbounds and generate traffic.
  5. Confirm the client appears online on the master while connected.
  6. Disconnect.
  7. Compare:
    • master client_traffics.last_online / master inbounds/list clientStats
    • remote node client_traffics.last_online / remote inbounds/list
  8. The remote timestamp advances, while the master timestamp remains stale.

I have not yet confirmed whether a newly-created remote-only client reproduces it, or whether the trigger specifically requires changing an existing client's inbound ownership/assignment.

Expected behavior

For a client assigned to managed remote-node inbounds, the master should merge the newest remote lastOnline (and corresponding traffic deltas) into the central client traffic state.

At minimum, after the remote node reports a newer timestamp, the master should not continue returning an older lastOnline for that client.

Actual behavior

  • Real-time online detection from the remote node works.
  • Remote node lastOnline updates correctly.
  • Master lastOnline remains stale.
  • The problem is especially visible for a remote-only client because there is no local inbound activity to overwrite the stale master timestamp.

I found related reports, but none appears to describe this exact behavior on 3.6.0:

  • #4966 — remote lastOnline API / timeout discussion (different symptom)
  • #5028 — multi-node traffic and Last Online regression on 3.2.8 (closed/fixed)
  • #4964 — node traffic sync failure caused by a PostgreSQL-specific merge error (different database/root cause)

Relevant logs

No sync warning was emitted during the reproduction window:

(no matching `node traffic sync`, `lastOnline`, or remote online-fetch warnings)

Which parts of the panel are affected?

Multi-node (sub-nodes), Statistics / traffic counters, Backend/API

Before submitting

  • I searched existing issues and found related reports, but not this exact current behavior.
  • This report is written in English.
  • Sensitive data (real client name, UUID, subscription ID, tokens, IPs/domains) has been redacted.
Originally created by @gaojiefengxswhuhit on GitHub (Aug 21, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6280 ### Describe the bug In a multi-node setup, a client that is assigned only to remote-node inbounds can be detected as **online** by the master panel, but the same client's `lastOnline` and traffic row on the master remain stale. The remote node itself has the correct, newer `lastOnline`, so the inconsistency exists inside 3x-ui's multi-node synchronization rather than in an external UI. This became visible after changing an existing client from local/remote inbound assignments to **remote-only** inbound assignments. ### Environment - 3x-ui: **3.6.0** on master and remote nodes - Xray-core: **26.7.28** - Database: SQLite - Installation: `install.sh` - Multi-node setup: master panel + several managed remote nodes - Affected client: redacted below as `clientA` ### Observed behavior At the time of reproduction: 1. `clientA` was assigned only to two remote-node inbounds. 2. The remote node was `online` and its API was reachable normally. 3. While `clientA` was connected, the master could report it as currently online. 4. After disconnecting, the master's `lastOnline` immediately fell back to an old timestamp from the previous day. 5. Querying the remote node directly showed a current `lastOnline` from the connection that had just happened. Example (timestamps are real observations, identifiers are redacted): **Master `client_traffics`:** ```text email up down last_online clientA 3340478 14927787 2026-08-20 19:05:46 +08:00 ``` **Remote node `/panel/api/inbounds/list`:** ```text email: clientA up: 1370078 down: 7014422 lastOnline: 2026-08-21 20:46:01 +08:00 ``` So the remote node knows the client was online recently, while the master's stored `last_online` is still about a day old. The master API also returns the same stale `lastOnline` in the remote-backed inbound's `clientStats`. ### Additional clue On the master, `node_client_traffics` contains baseline rows for other clients on the affected remote node, but **no row for `clientA` on that node**, even though the remote node's `/panel/api/inbounds/list` includes `clientA` with current traffic and `lastOnline`. There were no `node traffic sync`, `lastOnline`, or online-fetch warnings in the master logs during the reproduction window, and the remote node heartbeat/status was healthy. ### How to reproduce the problem This is the sequence that exposed it in my setup: 1. Create a client on the master and use it normally. 2. Initially assign it to a local inbound and/or another node inbound, so it already has an existing `client_traffics` row. 3. Change the client's allowed inbounds so that it is now assigned **only to remote managed-node inbounds**. 4. Connect through one of those remote inbounds and generate traffic. 5. Confirm the client appears online on the master while connected. 6. Disconnect. 7. Compare: - master `client_traffics.last_online` / master `inbounds/list` clientStats - remote node `client_traffics.last_online` / remote `inbounds/list` 8. The remote timestamp advances, while the master timestamp remains stale. I have not yet confirmed whether a newly-created remote-only client reproduces it, or whether the trigger specifically requires changing an existing client's inbound ownership/assignment. ### Expected behavior For a client assigned to managed remote-node inbounds, the master should merge the newest remote `lastOnline` (and corresponding traffic deltas) into the central client traffic state. At minimum, after the remote node reports a newer timestamp, the master should not continue returning an older `lastOnline` for that client. ### Actual behavior - Real-time online detection from the remote node works. - Remote node `lastOnline` updates correctly. - Master `lastOnline` remains stale. - The problem is especially visible for a remote-only client because there is no local inbound activity to overwrite the stale master timestamp. ### Related issues I found related reports, but none appears to describe this exact behavior on 3.6.0: - #4966 — remote `lastOnline` API / timeout discussion (different symptom) - #5028 — multi-node traffic and Last Online regression on 3.2.8 (closed/fixed) - #4964 — node traffic sync failure caused by a PostgreSQL-specific merge error (different database/root cause) ### Relevant logs No sync warning was emitted during the reproduction window: ```text (no matching `node traffic sync`, `lastOnline`, or remote online-fetch warnings) ``` ### Which parts of the panel are affected? Multi-node (sub-nodes), Statistics / traffic counters, Backend/API ### Before submitting - [x] I searched existing issues and found related reports, but not this exact current behavior. - [x] This report is written in English. - [x] Sensitive data (real client name, UUID, subscription ID, tokens, IPs/domains) has been redacted.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 21, 2026):

Your symptom is real, but the code says it is one step earlier than "the master fails to merge a newer lastOnline": on the master, a node client's last_online, its traffic delta and its node_client_traffics baseline are all written by the same loop iteration. So your "additional clue" is not a side observation — it is the proof. A missing node_client_traffics row for clientA on that node means the node's clientStats entry for clientA never reached the merge loop at all. The master is not merging a stale timestamp; it is not merging clientA from that node in the first place.

Real-time online status still looks correct because it arrives over a completely different endpoint that never touches the inbound list.

Why the three observations go together

The only place the master writes last_online for a node-hosted client is setRemoteTrafficLocked, and the baseline upsert is 5 lines below it in the same iteration (internal/web/service/inbound_node.go:904-926):

     `UPDATE client_traffics
      SET up = %s, down = %s, enable = %s, total = ?,
          expiry_time = CASE WHEN expiry_time > 0 AND CAST(? AS BIGINT) <= 0 THEN expiry_time ELSE CAST(? AS BIGINT) END,
          reset = ?, reset_day = ?, last_online = %s
      WHERE email = ?`,
     ...
     database.GreatestExpr("last_online", "?"),
...
if err := s.upsertNodeBaseline(tx, nodeID, cs.Email, canon.Up, canon.Down); err != nil {

The new-row branch (inbound_node.go:839-862) does the same pair. There is no path that writes one without the other, so "no baseline row" and "frozen last_online" are one fact, not two.

Online status comes from panel/api/clients/onlinesByGuid → snap.OnlineTree → process.SetNodeOnlineTree(nodeID, tree) (inbound_node.go:1131), fetched separately in internal/web/runtime/remote.go:752-763. That is why online is right while the timestamp is a day old.

What I could rule out

config_dirty on the node is not the cause. The if dirty { continue } guard at inbound_node.go:823-825 only fires when the client has no client_traffics row on the master at all, and existingEmails is a global email lookup (inbound_node.go:498-513, Where("email IN ?", batch)) — your master row exists, so rowExists is true and the guard is skipped. A permanently dirty node would still write both.

An ambiguous alias match is also out: inbound_node.go:566 returns an error, which would print node traffic sync: merge for <node> failed every 5 seconds (cadenceNodeTraffic = "@every 5s", internal/web/web.go:296). You saw no such warnings.

That leaves: clientA's whole node inbound is being dropped from the snapshot the master merges, before the client loop is entered at inbound_node.go:800-803:

c, ok := tagToCentral[snapIb.Tag]
if !ok {
    continue
}

The confirmed defect underneath it

Whatever drops the inbound, nothing catches it, because the master has no second channel for a node client's last-online. FetchTrafficSnapshot fetches one on every poll and throws it away:

// internal/web/runtime/remote.go:765-770
envLastOnline, err := r.do(ctx, http.MethodPost, "panel/api/clients/lastOnline", nil)
...
	_ = json.Unmarshal(envLastOnline.Obj, &snap.LastOnlineMap)

TrafficSnapshot.LastOnlineMap (remote.go:717) is written at remote.go:740 and remote.go:769 and read nowhere in the Go tree — a per-node HTTP round-trip every 5 seconds whose result is discarded. Contrast the local path, which has exactly this fallback: internal/web/job/xray_traffic_job.go:134 calls BumpClientsLastOnline(idleOnline) for clients that are connected but moved no bytes. The node path has no equivalent, so a node client the inbound-list merge skips keeps a frozen last_online indefinitely, with no log line. Identical in v3.6.0 and on the default branch.

What I still need to pin the skip

Please run these on the master and paste the output as text (no screenshots):

  1. Twice, about a minute apart — does the inbound itself still advance?
    SELECT id, tag, node_id, enable, port, up, down FROM inbounds WHERE node_id = <node id>;
    
    If up/down for clientA's inbound are frozen too, the whole inbound is being skipped, not just the client.
  2. Do other clients on the same inbound as clientA (not just the same node) have baseline rows?
    SELECT email, up, down FROM node_client_traffics WHERE node_id = <node id>;
    
  3. The node row — if inbound_sync_mode is selected, FilterNodeSnapshot (internal/web/service/node.go:792-810) silently drops every tag not listed in inbound_tags:
    SELECT id, name, status, enable, inbound_sync_mode, inbound_tags, config_dirty FROM nodes WHERE id = <node id>;
    
  4. The tag lists side by side: the tag values from step 1 versus the tag values in the node's own /panel/api/inbounds/list. A tag the node reports that has no node_id-matching row on the master is the skip. Note the node filters that endpoint by the requesting user (GetInbounds(user.Id) → Where("user_id = ?", userId), internal/web/service/inbound.go:166), so an inbound owned by a different panel user than the master's API token is visible to your admin query but invisible to the master.
  5. Master log lines since the panel last started, not just during your reproduction window — grep for collides with an existing inbound and no longer reports inbound. The first is logged once per (node, tag) per process (inbound_node.go:597-606), so it would predate the window you checked.

Verdict: Confirmed bug
Severity: Medium
Confidence: Medium
Root cause: Confirmed at internal/web/runtime/remote.go:765-770 + :717 — the per-node panel/api/clients/lastOnline fetch is stored in TrafficSnapshot.LastOnlineMap and never read, so the per-inbound clientStats merge in InboundService.setRemoteTrafficLocked (internal/web/service/inbound_node.go:904-926) is the sole writer of a node client's last_online on the master, with no fallback and no log when it skips a client. The upstream condition that drops clientA's inbound from the merged snapshot in this particular deployment is not yet pinned — see "Not determined".
Already fixed: Still present on the default branch; git show v3.6.0:internal/web/runtime/remote.go has the same unused LastOnlineMap at lines 672/695/724, and the merge in inbound_node.go is unchanged since v3.6.0 apart from the reset_day column.
Duplicate of: None. Related: #4966 (same endpoint, but a 404 on the node, not a discarded response); #4964 was a Postgres max(bigint, unknown) merge failure that logged loudly — yours logs nothing, which is the distinguishing fact.
Evidence: internal/web/service/inbound_node.go:909 reset = ?, reset_day = ?, last_online = %s with database.GreatestExpr("last_online", "?") at :914, paired with s.upsertNodeBaseline(tx, nodeID, cs.Email, canon.Up, canon.Down) at :923 — one iteration writes both, so a missing baseline proves the iteration never ran. inbound_node.go:800-803 is the gate that skips a snapshot inbound with no central match. inbound_node.go:823-825 if dirty { continue } is reachable only when rowExists is false, and existingEmails at :498-513 is a global email IN (...) lookup, which rules out config_dirty. inbound_node.go:1131 process.SetNodeOnlineTree(nodeID, tree) fed by remote.go:752-763 is the independent online channel. internal/web/service/node.go:793 if n == nil || snap == nil || n.InboundSyncMode != "selected" { return } is the tag filter. internal/web/web.go:296 cadenceNodeTraffic = "@every 5s". internal/web/job/xray_traffic_job.go:134 BumpClientsLastOnline(idleOnline) is the local-path fallback that the node path lacks.
Not determined: Which of FilterNodeSnapshot (selected-mode tag filter), the tag-collision skip at inbound_node.go:597-606, or a node-side user_id mismatch on panel/api/inbounds/list is dropping clientA's inbound in your setup. Item 1 above settles it in one step: if the node inbound's own up/down on the master are frozen alongside the client's, the inbound is being dropped from the snapshot; if they advance while only clientA stays put, the inbound is merged and the client is missing from its clientStats, which points at the node side instead.

Suggested fix: consume the already-fetched snap.LastOnlineMap in setRemoteTrafficLocked as a GREATEST merge for every email the node reports, independent of the per-inbound clientStats walk — the data is on the wire and discarded today. Separately, an inbound that the snapshot reports but the merge skips should say so once per tag, the way inbound_node.go:739 already does for the reverse case, so this class of failure stops being silent.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:5370075567 --> @github-actions[bot] commented on GitHub (Aug 21, 2026): Your symptom is real, but the code says it is one step earlier than "the master fails to merge a newer `lastOnline`": on the master, a node client's `last_online`, its traffic delta **and** its `node_client_traffics` baseline are all written by the *same* loop iteration. So your "additional clue" is not a side observation — it is the proof. A missing `node_client_traffics` row for `clientA` on that node means the node's `clientStats` entry for `clientA` never reached the merge loop at all. The master is not merging a stale timestamp; it is not merging `clientA` from that node in the first place. Real-time online status still looks correct because it arrives over a completely different endpoint that never touches the inbound list. ### Why the three observations go together The only place the master writes `last_online` for a node-hosted client is `setRemoteTrafficLocked`, and the baseline upsert is 5 lines below it in the same iteration (`internal/web/service/inbound_node.go:904-926`): ```go `UPDATE client_traffics SET up = %s, down = %s, enable = %s, total = ?, expiry_time = CASE WHEN expiry_time > 0 AND CAST(? AS BIGINT) <= 0 THEN expiry_time ELSE CAST(? AS BIGINT) END, reset = ?, reset_day = ?, last_online = %s WHERE email = ?`, ... database.GreatestExpr("last_online", "?"), ... if err := s.upsertNodeBaseline(tx, nodeID, cs.Email, canon.Up, canon.Down); err != nil { ``` The new-row branch (`inbound_node.go:839-862`) does the same pair. There is no path that writes one without the other, so "no baseline row" and "frozen `last_online`" are one fact, not two. Online status comes from `panel/api/clients/onlinesByGuid` → `snap.OnlineTree` → `process.SetNodeOnlineTree(nodeID, tree)` (`inbound_node.go:1131`), fetched separately in `internal/web/runtime/remote.go:752-763`. That is why online is right while the timestamp is a day old. ### What I could rule out `config_dirty` on the node is **not** the cause. The `if dirty { continue }` guard at `inbound_node.go:823-825` only fires when the client has no `client_traffics` row on the master at all, and `existingEmails` is a global email lookup (`inbound_node.go:498-513`, `Where("email IN ?", batch)`) — your master row exists, so `rowExists` is true and the guard is skipped. A permanently dirty node would still write both. An ambiguous alias match is also out: `inbound_node.go:566` returns an error, which would print `node traffic sync: merge for <node> failed` every 5 seconds (`cadenceNodeTraffic = "@every 5s"`, `internal/web/web.go:296`). You saw no such warnings. That leaves: **`clientA`'s whole node inbound is being dropped from the snapshot the master merges**, before the client loop is entered at `inbound_node.go:800-803`: ```go c, ok := tagToCentral[snapIb.Tag] if !ok { continue } ``` ### The confirmed defect underneath it Whatever drops the inbound, nothing catches it, because the master has no second channel for a node client's last-online. `FetchTrafficSnapshot` fetches one on every poll and throws it away: ```go // internal/web/runtime/remote.go:765-770 envLastOnline, err := r.do(ctx, http.MethodPost, "panel/api/clients/lastOnline", nil) ... _ = json.Unmarshal(envLastOnline.Obj, &snap.LastOnlineMap) ``` `TrafficSnapshot.LastOnlineMap` (`remote.go:717`) is written at `remote.go:740` and `remote.go:769` and **read nowhere in the Go tree** — a per-node HTTP round-trip every 5 seconds whose result is discarded. Contrast the local path, which has exactly this fallback: `internal/web/job/xray_traffic_job.go:134` calls `BumpClientsLastOnline(idleOnline)` for clients that are connected but moved no bytes. The node path has no equivalent, so a node client the inbound-list merge skips keeps a frozen `last_online` indefinitely, with no log line. Identical in v3.6.0 and on the default branch. ### What I still need to pin the skip Please run these on the **master** and paste the output as text (no screenshots): 1. Twice, about a minute apart — does the inbound itself still advance? ```sql SELECT id, tag, node_id, enable, port, up, down FROM inbounds WHERE node_id = <node id>; ``` If `up`/`down` for `clientA`'s inbound are frozen too, the whole inbound is being skipped, not just the client. 2. Do other clients **on the same inbound as `clientA`** (not just the same node) have baseline rows? ```sql SELECT email, up, down FROM node_client_traffics WHERE node_id = <node id>; ``` 3. The node row — if `inbound_sync_mode` is `selected`, `FilterNodeSnapshot` (`internal/web/service/node.go:792-810`) silently drops every tag not listed in `inbound_tags`: ```sql SELECT id, name, status, enable, inbound_sync_mode, inbound_tags, config_dirty FROM nodes WHERE id = <node id>; ``` 4. The tag lists side by side: the `tag` values from step 1 versus the `tag` values in the node's own `/panel/api/inbounds/list`. A tag the node reports that has no `node_id`-matching row on the master is the skip. Note the node filters that endpoint by the requesting user (`GetInbounds(user.Id)` → `Where("user_id = ?", userId)`, `internal/web/service/inbound.go:166`), so an inbound owned by a different panel user than the master's API token is visible to your admin query but invisible to the master. 5. Master log lines since the panel last **started**, not just during your reproduction window — grep for `collides with an existing inbound` and `no longer reports inbound`. The first is logged once per (node, tag) per process (`inbound_node.go:597-606`), so it would predate the window you checked. Verdict: Confirmed bug Severity: Medium Confidence: Medium Root cause: Confirmed at `internal/web/runtime/remote.go:765-770` + `:717` — the per-node `panel/api/clients/lastOnline` fetch is stored in `TrafficSnapshot.LastOnlineMap` and never read, so the per-inbound `clientStats` merge in `InboundService.setRemoteTrafficLocked` (`internal/web/service/inbound_node.go:904-926`) is the sole writer of a node client's `last_online` on the master, with no fallback and no log when it skips a client. The upstream condition that drops `clientA`'s inbound from the merged snapshot in this particular deployment is not yet pinned — see "Not determined". Already fixed: Still present on the default branch; `git show v3.6.0:internal/web/runtime/remote.go` has the same unused `LastOnlineMap` at lines 672/695/724, and the merge in `inbound_node.go` is unchanged since v3.6.0 apart from the `reset_day` column. Duplicate of: None. Related: #4966 (same endpoint, but a 404 on the node, not a discarded response); #4964 was a Postgres `max(bigint, unknown)` merge failure that logged loudly — yours logs nothing, which is the distinguishing fact. Evidence: `internal/web/service/inbound_node.go:909` `reset = ?, reset_day = ?, last_online = %s` with `database.GreatestExpr("last_online", "?")` at :914, paired with `s.upsertNodeBaseline(tx, nodeID, cs.Email, canon.Up, canon.Down)` at :923 — one iteration writes both, so a missing baseline proves the iteration never ran. `inbound_node.go:800-803` is the gate that skips a snapshot inbound with no central match. `inbound_node.go:823-825` `if dirty { continue }` is reachable only when `rowExists` is false, and `existingEmails` at :498-513 is a global `email IN (...)` lookup, which rules out `config_dirty`. `inbound_node.go:1131` `process.SetNodeOnlineTree(nodeID, tree)` fed by `remote.go:752-763` is the independent online channel. `internal/web/service/node.go:793` `if n == nil || snap == nil || n.InboundSyncMode != "selected" { return }` is the tag filter. `internal/web/web.go:296` `cadenceNodeTraffic = "@every 5s"`. `internal/web/job/xray_traffic_job.go:134` `BumpClientsLastOnline(idleOnline)` is the local-path fallback that the node path lacks. Not determined: Which of `FilterNodeSnapshot` (selected-mode tag filter), the tag-collision skip at `inbound_node.go:597-606`, or a node-side `user_id` mismatch on `panel/api/inbounds/list` is dropping `clientA`'s inbound in your setup. Item 1 above settles it in one step: if the node inbound's own `up`/`down` on the master are frozen alongside the client's, the inbound is being dropped from the snapshot; if they advance while only `clientA` stays put, the inbound is merged and the client is missing from its `clientStats`, which points at the node side instead. Suggested fix: consume the already-fetched `snap.LastOnlineMap` in `setRemoteTrafficLocked` as a `GREATEST` merge for every email the node reports, independent of the per-inbound `clientStats` walk — the data is on the wire and discarded today. Separately, an inbound that the snapshot reports but the merge skips should say so once per tag, the way `inbound_node.go:739` already does for the reverse case, so this class of failure stops being silent. *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
Author
Owner

@gaojiefengxswhuhit commented on GitHub (Aug 21, 2026):

Root cause found on my side: this was a configuration mistake, not a 3x-ui synchronization bug.

The master had the affected node configured as:

inboundSyncMode = selected
inboundTags = []

With selected mode and an empty tag list, FilterNodeSnapshot correctly filters out every inbound from that node before SetRemoteTraffic, so the remote lastOnline/traffic never reaches the central traffic merge. Real-time online detection could still work through the separate online-status path, which made the symptom look like a sync inconsistency.

After changing the node config to:

inboundSyncMode = selected
inboundTags = ["3X_AZURE_SG"]

3x-ui immediately created the (node,email) baseline and the master client_traffics.last_online advanced to the remote node's current timestamp. No 3x-ui code change was needed.

Sorry for the false report; closing this as a local configuration error.

<!-- gh-comment-id:5370173308 --> @gaojiefengxswhuhit commented on GitHub (Aug 21, 2026): Root cause found on my side: this was a configuration mistake, not a 3x-ui synchronization bug. The master had the affected node configured as: ```text inboundSyncMode = selected inboundTags = [] ``` With `selected` mode and an empty tag list, `FilterNodeSnapshot` correctly filters out every inbound from that node before `SetRemoteTraffic`, so the remote `lastOnline`/traffic never reaches the central traffic merge. Real-time online detection could still work through the separate online-status path, which made the symptom look like a sync inconsistency. After changing the node config to: ```text inboundSyncMode = selected inboundTags = ["3X_AZURE_SG"] ``` 3x-ui immediately created the `(node,email)` baseline and the master `client_traffics.last_online` advanced to the remote node's current timestamp. No 3x-ui code change was needed. Sorry for the false report; closing this as a local configuration error.
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#4263
No description provided.