Skip to content

fix: enhance WebSocket stability, resolve XHTTP configurations and fix UI loading shifts#3997

Open
lolka1333 wants to merge 7 commits intoMHSanaei:mainfrom
lolka1333:main
Open

fix: enhance WebSocket stability, resolve XHTTP configurations and fix UI loading shifts#3997
lolka1333 wants to merge 7 commits intoMHSanaei:mainfrom
lolka1333:main

Conversation

@lolka1333
Copy link
Copy Markdown
Contributor

What is the pull request?

This PR is a comprehensive update that addresses several critical functional and UI/UX issues across the panel:

  1. WebSocket Stability & Resilience (Resolves WebSocket message too large: log spam when client list exceeds 1MB #3984): Fixes severe log spam on large panels by heavily increasing the hardcoded 1MB buffer ceiling to 100MB natively, and introducing a graceful fallback signal (broadcastInvalidate) which elegantly instructs the frontend to re-fetch via REST APIs if a WebSocket message is still structurally too large.
  2. Backend XHTTP / SplitHTTP Form Validation (Resolves XHTTP Padding Obfs Mode works only with "Referer" header in 3x-ui (most other options are broken) #3992): Resolves invalid dropdown attributes for xPaddingPlacement and uplinkDataPlacement within stream_xhttp.html. Previously absent cookie and query options caused the UI to send invalid payloads that forced Xray-core into throwing unsupported uplink data placement panics or intercepting monolithic HTTP headers.
  3. Inbounds UI "Flying Spinner" Fix: Fixes a notorious UI/UX bug on the inbounds.html page where full-table re-renders (like executing client toggle actions) forced the CSS <a-spin> to violently jump out of the wrapper due to instantaneous array splicing (splice(0)). The master loading spinner is now physically locked and perfectly centered relative to the layout via specific fixed CSS.

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

Screenshots

test999 added 7 commits April 6, 2026 08:16
…igh-performance WebSocket hub and background job system
1. **Fixed XPadding Placement Dropdown**:
   - Added the missing `cookie` and `query` options to `xPaddingPlacement` (`stream_xhttp.html`).
   - *Why:* Previously, users wanting `cookie` obfuscation were forced to use the `header` placement string. This caused Xray-core to blindly intercept the entire monolithic HTTP Cookie header, failing internal padding-length validations and causing the inbound to silently drop the connection.
2. **Fixed Uplink Data Placement Validation**:
   - Replaced the unsupported `query` option with `cookie` in `uplinkDataPlacement`.
   - *Why:* Xray-core's `transport_internet.go` explicitly forbids `query` as an uplink placement option. Selecting it from the UI previously sent a payload that would cause Xray-core to instantly throw an `unsupported uplink data placement: query` panic. Adding `cookie` perfectly aligns the UI with Xray-core restrictions.
### Related Issues
- Resolves MHSanaei#3992
…ctioning correctly and eliminates WebSocket log spam.

- **[Fix X-Padding UI]** Added missing `cookie` and `query` options to X-Padding Placement. Fixes the issue where using Cookie fallback triggers whole HTTP Cookie header interception and silent drop in Xray-core. (Resolves [MHSanaei#3992](MHSanaei#3992))
- **[Fix Uplink Data Options]** Replaced the invalid `query` option with `cookie` in Uplink Data Placement dropdown to prevent Xray-core backend panic `unsupported uplink data placement: query`.
- **[Fix WebSockets Spam]** Boosted `maxMessageSize` boundary to 100MB and gracefully handled fallback fetch signals via `broadcastInvalidate` to avoid buffer dropping spam. (Resolves [MHSanaei#3984](MHSanaei#3984))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants