mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5061] [Bug]: Shadowrocket XHTTP server failure #3562
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#3562
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 @s777enx on GitHub (Jun 7, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5061
Describe the bug
When I try to use XHTTP Reality connection via Shadowrocket on iOS 26.5+ it gives 3 successfull pings and afterwards its not work for anyone else, it drops all inbounds so everyone gets Timeout, while any other clients (V2Box, etc.) works somehow. After 3-10 minutes it backs to normal.
Feels like server starts to block my IP for a while.
Maybe a Xray bug, idk.
How to reproduce the problem
Expected behavior
I expect that it would not drop/block whole server once someone just trying to use shadowrocket, at least break shadowrocket connection and not whole server.
Actual behavior
Breaks whole Xray server connection so everyone gets timeout.
Relevant logs
Screenshots
No response
3x-ui version
3.2.8
Xray-core version
26.6.1
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 24.04
Which parts of the panel are affected?
Other
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
Yes — Nginx
Before submitting
@github-actions[bot] commented on GitHub (Jun 7, 2026):
Thanks for the detailed report.
What the code shows
3x-ui's watchdog (
web/job/check_xray_running_job.go) runs every 1 second and restarts Xray within ~2 seconds of a process crash. Because you're seeing a 3–10 minute outage, Xray is not crashing — it is still running as a process but failing to serve connections (a hang/deadlock, not an exit).The fail2ban IP-limit jail (
3x-ipl) only bans a specific client IP when a client exceeds their per-client IP limit setting. Its default ban time is 30 minutes (set inx-ui.sh → create_iplimit_jails), which doesn't match your 3–10 minute window either. Unless a client hasLimitIP > 0configured, fail2ban is not involved here.Most likely cause
This looks like an Xray-core XHTTP bug triggered by the specific way Shadowrocket on iOS 26 beta implements XHTTP. When Shadowrocket connects, it may send something that causes Xray's XHTTP handler to hang (goroutine block, connection pool exhaustion, etc.), making the whole process unresponsive to new connections even though the process itself is still alive. After a few minutes the stuck goroutines time out internally and Xray recovers.
Since all inbounds go down together (not just XHTTP), it likely exhausts a shared resource (listener goroutine, file descriptor table, or similar).
To confirm and narrow it down
Is Xray actually stuck? During the next outage, run:
If
systemctl status x-uishowsActive: active (running)but connections fail, it's a hang, not a crash.Collect Xray logs during the incident:
Look for any
ERRORor panic lines around the time Shadowrocket connects.Does a manual Xray restart immediately fix it?
If yes, this confirms it's a hung Xray process.
Nginx setup: Since you're behind Nginx — is the XHTTP inbound routed via Nginx's
streamblock (TCP passthrough) or vialocationproxy? With REALITY, TLS can't be terminated by Nginx, so a TCP passthrough or no Nginx involvement for that port would be expected.Do any clients have
IP Limit > 0? Check in the panel: Inbounds → Edit client → IP Limit field. If any client has a limit set, please check/var/log/x-ui/3xipl.logduring the outage.Recommendation
Since this is triggered by Shadowrocket's XHTTP behavior and affects the Xray process itself, this is most likely an Xray-core bug. If the steps above confirm a hung Xray (process alive but unresponsive), please open an issue at https://github.com/XTLS/Xray-core/issues with:
In the meantime, the only workaround available in 3x-ui is configuring Xray to auto-restart on hang — which isn't currently implemented (the watchdog only catches process exits, not hangs).