alireza0:S-UI 的 gRPC 服务名含斜杠时存在客户端路径差异
在 S-UI 的 gRPC 连接问题讨论中,alireza0 解释,链接已正确编码 serviceName,但完整 gRPC 的 sing-box、使用轻量 gRPC 传输的 sing-box 客户端,以及 Xray,会以不同方式构造含 / 的服务名路径。他建议服务名避免使用 /,改用字母、数字、连字符、下划线或点。
作者原文@alireza0Thanks for the report.
This isn't something s-ui generates wrongly: the link carries
serviceNamecorrectly encoded. The problem is that gRPC implementations build the request path from a service name containing/in different ways:
- s-ui's sing-box (built with full gRPC) serves
/<serviceName>/Tununescaped, e.g.//test/test/Tun. Another s-ui panel builds the same path, which is why panel-to-panel works.- sing-box clients built without full gRPC (the "lite" transport) escape the name and request
/%2Ftest%2Ftest/Tun.- Xray treats a name starting with
/as a custom path and requests/test/testas is.So the three never agree once the name contains
/. Please use a service name without/(letters, digits,-,_,.); that works with every client.