Files
3x-ui/web
MHSanaei d347605233 fix(remote-traffic): handle tag collisions + readable warning format
setRemoteTrafficLocked attempted to INSERT a new central inbound for
every snap whose tag was not in tagToCentral (which is scoped by
node_id). When a different owner — the local panel or another node —
already held the tag, the INSERT tripped the UNIQUE constraint on
inbounds.tag and re-fired on every periodic snap.

Pre-check for tag ownership before the INSERT. If a different owner
holds it, log once per (nodeID, tag) via a sync.Map dedupe and skip
silently from then on. Real DB errors still surface.

Also switch the six setRemoteTraffic warnings from logger.Warning(...)
to logger.Warningf("%q ... %v", ...) — fmt.Sprint only inserts spaces
between adjacent non-string operands, so the all-string call sites
produced runs like "taginbound-443failed:UNIQUE...". Format strings
also let us quote the tag with %q so it stands out from the prose.
2026-05-27 18:34:18 +02:00
..
2026-05-19 12:20:24 +02:00
v3
2026-05-10 02:13:42 +02:00