wyx2685 / V2bX

Mozilla Public License 2.0
272 stars 101 forks source link

Xray ws path problem #5

Closed Mehdisharbaf closed 1 week ago

Mehdisharbaf commented 2 weeks ago

When I define a path on the server side in the Xray core for VMess WS connections, it is not applied in the connection.

PA733 commented 1 week ago

Same here.

wyx2685 commented 1 week ago

@PA733 no detail = no solve

PA733 commented 1 week ago

@PA733 no detail = no solve

抱歉,以为这个很好复现,所以没想着补充信息。 晚点看看怎么补充。

PA733 commented 1 week ago

环境

Xboard f099cf6 V2bX v0.0.8-20240624 Clash Verge Rev v1.6.6

复现方法

  1. 创建一个 Vmess 节点,传输类型 WebSocket

  2. 协议配置修改为

    {
    "path": "/test?ed=2048",
    "headers": {
    "Host": "test.v-50.me"
    }
    }

    image

  3. 客户端尝试连接

    {
    name: "🇭🇰 [Vmess]v-50 Test",
    server: test.v-50.me,
    port: 80,
    type: vmess,
    uuid: 45de11df-6767-46f8-b5f8-0cf72e0154db,
    alterId: 0,
    cipher: auto,
    tls: false,
    network: ws,
    ws-opts: { path: "/test?ed=2048", headers: { Host: test.v-50.me } },
    udp: true,
    }

    image 此时尝试 curl 一下: image 可见,根目录是可以访问到的,但 /test 报 404

  4. 修改客户端配置(但不修改 Xboard 上的配置):将 ws-opt -> path 中的 test 去掉

    ws-opts: { path: "/?ed=2048", headers: { Host: test.v-50.me } }

    image 连接恢复正常。

总结

至少在我的环境上,V2bX 不会正常应用 path 配置(看上去好像是把 Path 丢掉了,因为 ?ed=2048 带来的 0-RTT 还是生效的)。

Mehdisharbaf commented 1 week ago

Hello dear PA733 This was exactly my problem. Thanks for the detailed explanation.

wyx2685 commented 1 week ago

尝试修复请测试https://github.com/wyx2685/V2bX/commit/4dda65a636574df51e3728bd9a85b2b91b741a38

PA733 commented 1 week ago

抱歉回复晚了。 已测试,好像问题依旧。 修改 Xboard 配置后已经等待了至少五分钟,试图让配置生效。

客户端测试

image

curl 测试

image

Xboard 配置

image image

wyx2685 commented 1 week ago

之前没有发布,需要去action下载测

PA733 commented 1 week ago

测试成功,已确认修复。 image image

佬辛苦了!