docs: add new issue about mux

This commit is contained in:
chuan
2026-05-27 14:53:30 +08:00
Unverified
parent fbf8ecd799
commit f97f01ec52
2 changed files with 90 additions and 1 deletions
+89
View File
@@ -0,0 +1,89 @@
# VLESS Reality Vision 开启 mux 后连接被关闭
## 问题
在节点使用 `VLESS + REALITY + xtls-rprx-vision` 时,开启 `mux` 后,透明代理和本地 HTTP/SOCKS 代理都会出现请求失败。
现象:
```text
curl google.com
curl: (52) Empty reply from server
```
Xray 日志:
```text
common/mux: dispatching request to tcp:google.com:80
proxy/vless/outbound: tunneling request to tcp:v1.mux.cool:9527
common/mux: failed to read metadata > io: read/write on closed pipe
```
关闭 `mux` 后,同一节点恢复正常:
```text
curl http://google.com/ -> HTTP/1.1 301
curl https://google.com/ -> HTTP/2 301
HTTP/SOCKS inbound 测试 -> 正常
```
## 原因
当前失败不在 transparent/iptables,而在 Xray outbound 层。
`mux` 会把多个 TCP 请求封装进一个 Mux.Cool 连接;官方文档说明它用于减少 TCP 握手延迟,默认关闭,并且不用于提升吞吐。`xtls-rprx-vision` 是 VLESS 的 XTLS flow,官方文档说明它在 `TCP + TLS/REALITY` 下会对 TLS 1.3 数据走底层直拷路径。
两者叠加时,业务连接不再按普通 VLESS 请求直接发送,而是先被封装成 `v1.mux.cool` 子连接:
```mermaid
flowchart LR
A[curl / app] --> I[Xray inbound]
I --> R[routing -> proxy]
R --> M[mux<br/>v1.mux.cool]
M --> V[VLESS<br/>flow=xtls-rprx-vision]
V --> T[REALITY/TCP server]
T --> X[server closes pipe]
```
Xray-core 讨论区有同类案例:配置为 `VLESS + REALITY + TCP + xtls-rprx-vision + mux` 时,请求报 `curl: (52) Empty reply from server`,服务端日志出现 `common/mux``closed pipe` 类错误;去掉 `mux` 后恢复。
因此这里的结论是:该节点组合下 `mux``xtls-rprx-vision` 不兼容或服务端不接受 mux 封装后的请求。
## 解决方案
在 UI 的“核心设置”里关闭 `mux`,保存并重启 Xray。
生成配置中不要出现:
```json
"mux": {
"enabled": true,
"concurrency": 4
}
```
修复后路径:
```mermaid
flowchart LR
A[curl / app] --> I[Xray inbound]
I --> R[routing -> proxy]
R --> V[VLESS<br/>flow=xtls-rprx-vision]
V --> T[REALITY/TCP server]
T --> G[google.com / target]
```
验证命令:
```sh
curl -v http://google.com/
curl -vk https://google.com/
curl -v -x http://127.0.0.1:20172 http://google.com/
curl -v --socks5-hostname 127.0.0.1:20170 https://google.com/
```
参考:
- [Project X: Outbound Proxy (Mux, XUDP)](https://xtls.github.io/en/config/outbound.html)
- [Project X: VLESS (XTLS Vision Seed)](https://xtls.github.io/en/config/inbounds/vless.html)
- [XTLS/Xray-core discussion #5481](https://github.com/XTLS/Xray-core/discussions/5481)
Generated
+1 -1
View File
@@ -154,7 +154,7 @@ wheels = [
[[package]]
name = "pyxray"
version = "1.0.2"
version = "1.0.3"
source = { editable = "." }
dependencies = [
{ name = "flask" },