Skip to content

XHTTP server: Forbid Mux.Cool except pure XUDP - #4128

Merged
RPRX merged 1 commit into
mainfrom
xhttp
Dec 7, 2024
Merged

RPRX merged 1 commit into
mainfrom
xhttp

Conversation

@RPRX

@RPRX RPRX commented Dec 7, 2024

Copy link
Copy Markdown
Member

XHTTP 的 H2 & H3 自带 XMUX,这个 PR 复用了 Vision 通知 Mux.Cool 禁 TCP 的机制,从而防止了双层 Mux,至于 H1,它不重要

底层传输那里 listen 调来调去的太绕了,终于又一次理清后发现加这里最合适,v25 争取把各种 interface 和 register 清掉

@RPRX
RPRX merged commit 46d8d9e into main Dec 7, 2024
@RPRX
RPRX deleted the xhttp branch December 7, 2024 06:05
@ssmetall

Copy link
Copy Markdown

There are problems with using xhttp in the iOS operating system. I will give you an example. When mux is enabled in the web socket configurations, communication is established without any problems. However, in xhttp, the tunnel is disconnected every 5 minutes and memory problems occur. xmux does not help the situation. How can we find out if xmux is working properly?

@BrewTestBot BrewTestBot mentioned this pull request Dec 18, 2024
1 task done
it2konst pushed a commit to it2konst/game-tun that referenced this pull request Mar 1, 2026
drovosek229 pushed a commit to drovosek229/Xray-core that referenced this pull request Mar 16, 2026
Medium1992 pushed a commit to Medium1992/Xray-core-fork that referenced this pull request Sep 13, 2026
XTLS#4128 limited Mux.Cool over XHTTP to pure XUDP. Allowing TCP sessions alone
makes idle cuts worse: a quiet Mux connection is still cut by CDN idle timers,
and every session on it drops together.

SessionStatusKeepAlive is handled on both sides but never sent. The server now
sends it every 3-8s, so a Mux connection whose sessions are all quiet keeps
carrying bytes downstream.
Medium1992 pushed a commit to Medium1992/Xray-core-fork that referenced this pull request Sep 13, 2026
XTLS#4128 limited Mux.Cool over XHTTP to pure XUDP. Allowing TCP sessions alone
makes idle cuts worse: a quiet Mux connection is still cut by CDN idle timers,
and every session on it drops together.

SessionStatusKeepAlive is handled on both sides but never sent. The server now
sends it every 3-8s, but only on XHTTP packet-up and stream-up, whose downlink
is a long-lived response of its own. Other transports, and stream-one, which
is what a client picks for REALITY, get no extra traffic.
Medium1992 pushed a commit to Medium1992/Xray-core-fork that referenced this pull request Sep 15, 2026
XTLS#4128 limited Mux.Cool over XHTTP to pure XUDP; allow it again.

"muxKeepAliveSecs": send a KeepAlive once the downlink has been silent that
long, so a CDN does not take it for idle and cut it. Off unless set.
"muxKeepAliveBytes": random padding in each one, so they do not all leave at
the same size.
Medium1992 pushed a commit to Medium1992/Xray-core-fork that referenced this pull request Sep 15, 2026
XTLS#4128 limited Mux.Cool over XHTTP to pure XUDP; allow it again.

"muxKeepAliveSecs": send a KeepAlive once the downlink has been silent that
long, so a CDN does not take it for idle and cut it. Off unless set.
"muxKeepAliveBytes": random padding in each one, so they do not all leave at
the same size.
Medium1992 pushed a commit to Medium1992/Xray-core-fork that referenced this pull request Sep 16, 2026
XTLS#4128 limited Mux.Cool over XHTTP to pure XUDP; allow it again.

"muxKeepAliveSecs": send a KeepAlive once the downlink has been silent that
long, so a CDN does not take it for idle and cut it. Off unless set.
"muxKeepAliveBytes": random padding in each one, so they do not all leave at
the same size.
Medium1992 pushed a commit to Medium1992/Xray-core-fork that referenced this pull request Sep 16, 2026
XTLS#4128 limited Mux.Cool over XHTTP to pure XUDP; allow it again.

"muxKeepAliveSecs": send a KeepAlive once the downlink has been silent that
long, so a CDN does not take it for idle and cut it. Off unless set.
"muxKeepAliveBytes": random padding in each one, so they do not all leave at
the same size.
Medium1992 pushed a commit to Medium1992/Xray-core-fork that referenced this pull request Sep 16, 2026
XTLS#4128 limited Mux.Cool over XHTTP to pure XUDP; allow it again.

"muxKeepAliveSecs": send a KeepAlive once the downlink has been silent that
long, so a CDN does not take it for idle and cut it. Off unless set.
"muxKeepAliveBytes": random padding in each one, so they do not all leave at
the same size.
Medium1992 pushed a commit to Medium1992/Xray-core-fork that referenced this pull request Sep 16, 2026
XTLS#4128 limited Mux.Cool over XHTTP to pure XUDP; allow it again.

"muxKeepAliveSecs": send a KeepAlive once the downlink has been silent that
long, so a CDN does not take it for idle and cut it. Off unless set.
"muxKeepAliveBytes": random padding in each one, so they do not all leave at
the same size.
TaiLerV pushed a commit to TaiLerV/Xray-core-up that referenced this pull request Oct 6, 2026
XHTTP inbounds accept Mux.Cool TCP sessions, unlike upstream (XTLS#4128), and can poke an idle packet-up or stream-up downlink with a Mux.Cool KeepAlive. Note that fields 30 and 31 of the splithttp Config message are fork-owned.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants