-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
识别 SOCKS4A 请求中可能的 IP 地址以提高稳健性 #3622
Comments
感谢报告问题,打算把 Socks4(a) 删掉:#1967 |
顺便提一句Chrome发送的socks5请求也有这种问题
Windows目前还只支持socks4 还是留着吧 反正也这玩意没依赖 |
@Fangliding |
@Fangliding |
|
Fangliding
added a commit
to Fangliding/Xray-core
that referenced
this issue
Aug 3, 2024
RPRX
pushed a commit
that referenced
this issue
Aug 3, 2024
leninalive
pushed a commit
to amnezia-vpn/amnezia-xray-core
that referenced
this issue
Oct 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
完整性要求
版本
1.8.23
描述
作为 SOCKS4 协议的扩展,SOCKS4A 允许客户端以特殊格式在请求中使用域名作为目标地址,以便服务端解析域名。然而,即使目标是 IP 地址,某些客户端仍然会使用此格式发送请求(例如 cURL 和 Gecko)。这导致 Xray 错误地将其中的 IP 地址视为域名,并在进行路由规则匹配时指向错误的出口:
Xray-core/proxy/socks/protocol.go
Lines 72 to 78 in 4c82ef8
尽管这听起来更像是客户端实现的问题,主动识别请求中的地址类型也能提高 Xray 的稳健性。需要注意的是,Gecko 发送的 SOCKS5 请求同样存在上述问题,但由于 Xray 在处理 SOCKS5 请求时能够识别可能的 IP 地址,因此能够正确处理:
Xray-core/common/protocol/address.go
Lines 213 to 218 in 4c82ef8
重现方式
客户端配置
服务端配置
N/A
客户端日志
服务端日志
N/A
The text was updated successfully, but these errors were encountered: