[GH-ISSUE #5061] [Bug]: Shadowrocket XHTTP server failure #3562

Closed
opened 2026-10-31 20:33:20 +07:00 by bsakaguchi · 1 comment
Owner

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

  1. Open Shadowrocket on iOS 26.5+
  2. Ping/connect to XHTTP Reality server
  3. Server being timeout for all inbounds for X time

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

Panel is unaccessible.

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

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
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 1. Open Shadowrocket on iOS 26.5+ 2. Ping/connect to XHTTP Reality server 3. Server being timeout for all inbounds for X time ### 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 ```shell Panel is unaccessible. ``` ### 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 - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:33:20 +07:00
Author
Owner

@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 in x-ui.sh → create_iplimit_jails), which doesn't match your 3–10 minute window either. Unless a client has LimitIP > 0 configured, 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

  1. Is Xray actually stuck? During the next outage, run:

    # Is the process still up?
    systemctl status x-ui
    # Can you reach Xray's internal API?
    curl -s http://127.0.0.1:62789/ 2>&1 | head
    

    If systemctl status x-ui shows Active: active (running) but connections fail, it's a hang, not a crash.

  2. Collect Xray logs during the incident:

    journalctl -u x-ui --since "YYYY-MM-DD HH:MM:SS" --until "YYYY-MM-DD HH:MM:SS" | tail -100
    

    Look for any ERROR or panic lines around the time Shadowrocket connects.

  3. Does a manual Xray restart immediately fix it?

    x-ui   # then choose option 5 (Restart)
    

    If yes, this confirms it's a hung Xray process.

  4. Nginx setup: Since you're behind Nginx — is the XHTTP inbound routed via Nginx's stream block (TCP passthrough) or via location proxy? With REALITY, TLS can't be terminated by Nginx, so a TCP passthrough or no Nginx involvement for that port would be expected.

  5. 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.log during 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:

  • Xray version: 26.6.1
  • Transport: XHTTP + REALITY
  • Client: Shadowrocket on iOS 26 beta
  • Logs from step 2 above

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).

<!-- gh-comment-id:4644148145 --> @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 in `x-ui.sh → create_iplimit_jails`), which doesn't match your 3–10 minute window either. Unless a client has `LimitIP > 0` configured, 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 1. **Is Xray actually stuck?** During the next outage, run: ```bash # Is the process still up? systemctl status x-ui # Can you reach Xray's internal API? curl -s http://127.0.0.1:62789/ 2>&1 | head ``` If `systemctl status x-ui` shows `Active: active (running)` but connections fail, it's a hang, not a crash. 2. **Collect Xray logs during the incident:** ```bash journalctl -u x-ui --since "YYYY-MM-DD HH:MM:SS" --until "YYYY-MM-DD HH:MM:SS" | tail -100 ``` Look for any `ERROR` or panic lines around the time Shadowrocket connects. 3. **Does a manual Xray restart immediately fix it?** ```bash x-ui # then choose option 5 (Restart) ``` If yes, this confirms it's a hung Xray process. 4. **Nginx setup**: Since you're behind Nginx — is the XHTTP inbound routed via Nginx's `stream` block (TCP passthrough) or via `location` proxy? With REALITY, TLS can't be terminated by Nginx, so a TCP passthrough or no Nginx involvement for that port would be expected. 5. **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.log` during 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](https://github.com/XTLS/Xray-core/issues) with: - Xray version: 26.6.1 - Transport: XHTTP + REALITY - Client: Shadowrocket on iOS 26 beta - Logs from step 2 above 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).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#3562
No description provided.