mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5501] [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. #3842
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#3842
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/5501
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?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 23, 2026):
The behavior is confirmed in the source: disabling an inbound removes its listener from Xray but does not terminate connections that were already established before the toggle.
What the panel actually does (verified in source)
When you toggle an inbound off,
SetInboundEnableininternal/web/service/inbound.go:884callsrt.DelInbound(), which issues a gRPCRemoveInboundcall to the running Xray process (internal/xray/api.go:158-170). That call removes the inbound listener — new connections to that port/address will be refused — but the Xray gRPCRemoveInboundAPI has no mechanism to forcibly close already-established connections. Those sessions survive at the OS networking layer until they close naturally (client disconnects, idle timeout, NAT expiry, etc.).Why a restart terminates them
Restarting the Xray child process closes all file descriptors, which hard-terminates every established connection. That is the only current path to immediate disconnection of active sessions.
Workaround
From the panel's Settings page there is a "Restart Xray" button, or you can run:
This terminates all active connections in addition to applying the disable.
Root cause
This is a limitation of the Xray-core gRPC
HandlerService.RemoveInboundRPC, not a panel logic error. Addressing it within 3x-ui would require either:A related report for the same underlying behavior was filed as #4119.
One piece of information that would help narrow scope: the Xray-core version in use (visible in the panel footer or via
cat /usr/local/x-ui/bin/xray-linux-* | head— or the panel Settings page shows the version). Different Xray builds occasionally change gRPC API semantics.This reply was generated automatically; a maintainer may follow up.