mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-31 10:14:15 +00:00
Tag scheme moves to "[n<nodeID>-]inbound-[<listen>:]<port>-<transport>"
so two long-standing collision classes go away on the create path:
- tcp/443 and udp/443 on the same listener (independent sockets)
- same listen+port living on the central panel and on a remote node
Examples:
local TCP 443 → inbound-443-tcp
local UDP 443 → inbound-443-udp
node 1 TCP 443 → n1-inbound-443-tcp
Refactor:
- composeInboundTag is the single source of truth, called from
generateInboundTag. Transport segment is now always present
(used to appear only on collision); n<id>- prefix is added when
Inbound.NodeID != nil.
- addInbound / importInbound drop their inline "inbound-<port>"
fallback; an empty Tag now flows through resolveInboundTag, which
keeps caller-supplied tags verbatim when free and otherwise
delegates to generateInboundTag.
- setRemoteTrafficLocked indexes tagToCentral under both the stored
tag and the prefix-stripped form, so a node sending its bare tag
still resolves to a row we may have rewritten at materialization.
The create branch now picks between snap.Tag and the n<id>-
prefixed form before falling back to the warn-once skip.
- Tests updated for the always-on transport suffix, and two new
cases cover the node-prefix behaviour.
Existing inbounds keep their tags — only newly generated tags adopt
the new shape, so user routing rules pointing at "inbound-443" still
match the row they always did until the row is recreated.
|
||
|---|---|---|
| .. | ||
| api_token.go | ||
| client.go | ||
| client_sync_multiprotocol_test.go | ||
| client_test.go | ||
| config.json | ||
| custom_geo.go | ||
| custom_geo_test.go | ||
| fallback.go | ||
| inbound.go | ||
| metric_history.go | ||
| node.go | ||
| node_test.go | ||
| nord.go | ||
| outbound.go | ||
| panel.go | ||
| panel_other.go | ||
| panel_test.go | ||
| panel_unix.go | ||
| port_conflict.go | ||
| port_conflict_test.go | ||
| server.go | ||
| server_vlessenc_test.go | ||
| setting.go | ||
| setting_security_test.go | ||
| tgbot.go | ||
| tgbot_test.go | ||
| traffic_writer.go | ||
| traffic_writer_test.go | ||
| url_safety.go | ||
| user.go | ||
| warp.go | ||
| websocket.go | ||
| xray.go | ||
| xray_metrics.go | ||
| xray_setting.go | ||
| xray_setting_test.go | ||