XTLS / Xray-core

Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.
https://t.me/projectXray
Mozilla Public License 2.0
24.19k stars 3.81k forks source link

Connecting to the server inbounds through multiple domains #3383

Closed YahYaTNT closed 3 months ago

YahYaTNT commented 3 months ago

Integrity requirements

Version

1.8.11

Description

From xray version 1.8.10 or higher If the header value in tcp+http transmission or websocket transmission or ... in inbounds is not equal in the client and server, the communication will not be established. And the connection is limited to one domain

Therefore, according to the new update of Iran's firewall and frequent filtering of subdomains, it is necessary to be able to connect to inbounds with different subdomains.

That is, like version 1.8.9 or earlier Do not check the value of the headers. To be able to connect to the server with several different addresses

Is there a solution to the problem?

Reproduction Method

Client config


Server config



Client log



Server log



RPRX commented 3 months ago

对于 WebSocket 和 HTTPUpgrade,服务端不写 host 就没有限制

YahYaTNT commented 3 months ago

对于 WebSocket 和 HTTPUpgrade,服务端不写 host 就没有限制

Thank you very much

YahYaTNT commented 3 months ago

对于 WebSocket 和 HTTPUpgrade,服务端不写 host 就没有限制

The same goes for the path value?

RPRX commented 3 months ago

The same goes for the path value?

我不确定,懒得看代码了,你测试一下然后发到这里,@Fangliding 补充文档

Fangliding commented 3 months ago

The same goes for the path value?

我不确定,~懒得看代码了~,你测试一下然后发到这里,@Fangliding 补充文档

见https://github.com/XTLS/Xray-core/blob/3120ca41210312c5c8b1795eaf3dbf54531e437e/transport/internet/websocket/hub.go#L46 这里并没有检查路径设置是否为空 毕竟path为空确实有自己的含义(根路径)