mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5500] [Bug]: #3840
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#3840
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 @barbod1123-bit on GitHub (Jun 23, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5500
Describe the bug
Man, the panel really has a bug.
When you disable an inbound, the configs connected to that inbound still keep working. You have to restart the core for them to actually get disconnected.
How to reproduce the problem
.
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.3.1
Xray-core version
No response
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 22
Which parts of the panel are affected?
No response
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
No response
Before submitting
@github-actions[bot] commented on GitHub (Jun 23, 2026):
This behavior is confirmed against the current source (v3.3.1). Disabling an inbound does take immediate effect for new connection attempts, but does not terminate existing established connections. Here is why.
When you toggle the enable switch off,
SetInboundEnable()ininternal/web/service/inbound.go(lines 884–948) does the following in order:enable = falsein the database.rt.DelInbound(), which invokesXrayAPI.DelInbound()(internal/xray/api.go, lines 159–170). This sends aRemoveInboundRequestto xray-core over its local gRPC socket.needRestart = falsewhen the gRPC call succeeds).The xray-core gRPC
RemoveInboundcall does exactly what its name says: it removes the inbound handler from xray's runtime, so the port stops accepting new connections immediately. However, it has no mechanism to forcibly close connections that were already established before the call was made. Those connections are held open by existing goroutines inside the xray process and will keep running until either the remote peer disconnects or xray is restarted.This is a constraint of the xray-core handler API, not a panel-side oversight: there is no "drain and close all sessions for inbound X" gRPC call available.
Current behavior summary
Workaround
Restart xray-core from the panel (Settings → Restart Xray) or via the management menu (
x-ui→ Restart xray). This terminates all active sessions for the disabled inbound at the cost of briefly interrupting all other inbounds as well.A similar report covering both inbound disabling and traffic-limit enforcement was filed as #4119 (v2.9.3). Addressing this fully would require either a periodic cleanup pass that calls the IP-limit/kick mechanism against sessions belonging to disabled inbounds, or a restart path triggered on disable — both would have trade-offs for other active users.
This reply was generated automatically; a maintainer may follow up.