mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5530] [Bug]: Cannot remove node without deleting remote inbound #3860
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3860
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @atem32 on GitHub (Jun 24, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5530
Describe the bug
The Nodes feature provides an option to remove a node from the panel:
However, when trying to remove a node that has an attached inbound, the panel shows this error:
The problem is that there does not seem to be a way to detach an inbound from the node.
In the
Inboundstab, there is an option to detach a client, but there is no option to detach the inbound itself from the node.The only available action appears to be deleting the inbound. However, deleting the inbound also deletes it from the remote node, which is not the intended action.
The intended action is only to remove the node from the local panel while keeping the remote node and its inbound working.
How to reproduce the problem
Add a remote node to the panel using the Nodes feature.
Make sure the node has at least one inbound attached or synchronized.
Go to:
Try to remove the node.
The panel shows the following error:
Go to the
Inboundstab.Try to find an option to detach the inbound from the node.
There is an option to detach a client, but there is no option to detach the inbound itself.
The only available option is to delete the inbound, but this deletes the inbound from the remote node instead of only detaching it from the local panel.
Expected behavior
The panel should allow removing a node from the local panel without deleting inbounds from the remote node.
If a node has attached inbounds, there should be a clear way to detach those inbounds locally.
For example, one of the following options would solve the issue:
or:
or:
The important part is that removing a node from the local panel should not require deleting the inbound from the remote node.
The user should be able to remove the node connection while keeping the remote node fully working.
Actual behavior
The panel blocks node removal with the following error:
However, the UI does not provide a clear way to detach the inbound from the node.
The
Inboundstab provides an option to detach a client, but not to detach the inbound itself.The only apparent workaround is to delete the inbound, but that removes the inbound from the remote node, which is dangerous and not the intended behavior.
As a result, the user cannot safely remove a node from the local panel while keeping the remote node and its inbound intact.
Relevant logs
Screenshots
No response
3x-ui version
3.4.0
Xray-core version
26.6.22
How did you install 3x-ui?
install.sh script
Operating system
Debian 12
Which parts of the panel are affected?
Multi-node (sub-nodes)
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 24, 2026):
The error message is accurate but incomplete: the guard exists, yet no "detach inbound from node" operation is exposed anywhere in the UI or REST API. This is confirmed in the source.
Root cause — three interlocking facts
Delete guard (
internal/web/service/node.go:551–555):NodeService.Deletecounts inbounds whosenode_idequals the target node ID and rejects the delete if any are found:No detach-inbound-from-node operation exists: The only "detach" endpoints in the API (
POST /panel/api/clients/:email/detach,POST /panel/api/clients/bulkDetach) remove a client from an inbound, not an inbound from a node.InboundService.UpdateInbound(internal/web/service/inbound.go:969) explicitly locks the node assignment:inbound.NodeID = oldInbound.NodeID, so the standard edit path cannot clearnode_ideither. There is no API endpoint or UI action that setsinbound.node_id = NULL.Deleting an inbound pushes to the remote:
InboundService.DelInbound(internal/web/service/inbound.go:760–775) callsrt.DelInbound()on the remote node when the node is enabled and reachable, which removes the inbound from the remote Xray config.Workaround (no DB access required)
nodePushPlan(internal/web/service/inbound_node.go:51–52) skips the remote push when the node is disabled and instead marks the node dirty. This means you can delete the central inbound record locally without touching the remote, by disabling the node first:nodePushPlanreturnspush=false; the deletion is applied locally only and is not forwarded to the remote Xray instance.The remote node and its Xray inbounds remain fully operational throughout.
What a proper fix looks like
A proper fix would require at minimum one of:
PATCH /panel/api/inbounds/:id/nodewith{"nodeId": null}) that clearsinbound.node_idwithout pushing a deletion to the remote.node_idfor all attached inbounds before deleting the node row.Either approach would also need to decide what happens to the orphaned central inbound rows afterward (leave as local-only, or delete them — a policy question for the maintainers).
This reply was generated automatically; a maintainer may follow up.