Replies: 1 comment 1 reply
-
|
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
标题:
在 v2rayNG 7.12.5/Xray 25.5.16 中使用俄罗斯区域 Preset 时出现 slice length: unexpected EOF 错误(7.9.3 为最后可用版本)
描述:
在最新的 v2rayNG(7.12.5)结合 Xray 25.5.16 上尝试加载俄罗斯区域 Preset 时,会报如下错误,导致无法正常连接 VPN。经回溯发现,v2rayNG 7.9.3 及其对应的 Xray 版本仍然可以正常使用相同的区域 Preset,但从 7.10.0 及更高版本开始就一直报错。
重现步骤:
下载并安装 v2rayNG 7.12.5(Windows X64)。
获取俄罗斯区域专用 Preset(config.json)。
将 Preset 放入 v2rayNG 配置目录并选择加载。
启动服务,查看日志。
日志示例:
less
Копировать
Редактировать
[VLESS] VolfheimVPN-Volfheim_PC(***ru:443)
v2rayN - V7.12.5 - X64 | ...
Starting service (2025.06.06 19:59:43)...
Xray 25.5.16 (Xray, Penetrates Everything.) ...
2025/06/06 19:59:44.195071 [...] Reading config: &{Name:config.json Format:json}
2025/06/06 19:59:44.533813 [Warning] core: Xray 25.5.16 started
…
FATAL[0000] create service: initialize router: parse rule-set[3]: read rule[0]: [72885]: To: slice length: unexpected EOF
错误提示 slice length: unexpected EOF 表明 Xray 在解析 routing.rules 的某条规则时遇到了文件提前结束(EOF),无法正确读取完整内容,从而导致连接失败。
环境信息:
操作系统:Windows 11 Pro 24H2
v2rayNG 版本:7.12.5
Xray 版本:25.5.16
区域 Preset:针对俄罗斯的完整配置,UTF-8 编码
观察到的现象:
在 v2rayNG 7.9.3 + 对应 Xray 版本组合中,完全可以正常加载并使用俄罗斯区域 Preset。
从 v2rayNG 7.10.0 开始,只要加载该 Preset,就会在启动时触发上述 unexpected EOF 错误,无法使用。
即便将 Preset 的 JSON 格式做过验证(在线 JSON 校验器、jq . config.json),文件本身并无明显语法错误,且在旧版本中正常工作,说明问题出在新版 Xray/v2rayNG 对 routing.rules 解析逻辑的兼容性或边界处理上。
预期行为:
开发者能够修复解析模块,使得对旧版俄罗斯区域 Preset 的 routing.rules 正常兼容,不会因“slice 长度”或“EOF”而中断。希望在未来版本中恢复对该 Preset 的支持,以便用户继续使用完整的俄罗斯节点列表。
建议与期望:
检查并修复 Xray 对于 routing.rules 中大数组或嵌套结构解析时“slice length”边界判断的逻辑。
在 v2rayNG 中加入对旧 Preset 的兼容性测试用例,确保对常见区域 Preset(如俄罗斯)不会出现解析失败。
如需引入新的 Preset 规范或字段变更,请在文档中明确说明,并提供一份清晰的迁移指南供用户参考。
感谢开发团队的辛勤付出,盼望尽快在新版本中看到该问题的修复,以便继续使用俄罗斯区域 Preset 进行无缝连接。
English Version:
Title:
slice length: unexpected EOF Error When Using Russia Regional Preset on v2rayNG 7.12.5 / Xray 25.5.16 (Last Working: 7.9.3)
Description:
When loading the Russia regional Preset in the latest v2rayNG (7.12.5) with Xray 25.5.16, the following fatal error appears, preventing VPN from working. Tracing back demonstrates that v2rayNG 7.9.3 (with its matching Xray) could successfully load the same Russia Preset, but starting from 7.10.0 and above, the error always occurs.
Reproduction Steps:
Install v2rayNG 7.12.5 (Windows X64).
Obtain the Russia regional Preset (config.json).
Place the Preset into the v2rayNG configuration directory and select it.
Start the service and observe logs.
Sample Log:
less
Копировать
Редактировать
[VLESS] VolfheimVPN-Volfheim_PC(***ru:443)
v2rayN - V7.12.5 - X64 | ...
Starting service (2025.06.06 19:59:43)...
Xray 25.5.16 (Xray, Penetrates Everything.) ...
2025/06/06 19:59:44.195071 [...] Reading config: &{Name:config.json Format:json}
2025/06/06 19:59:44.533813 [Warning] core: Xray 25.5.16 started
…
FATAL[0000] create service: initialize router: parse rule-set[3]: read rule[0]: [72885]: To: slice length: unexpected EOF
The slice length: unexpected EOF indicates that Xray fails to parse one of the routing.rules entries due to unexpectedly hitting end-of-file (EOF) before reading the complete JSON fragment, causing a crash.
Environment Details:
OS: Windows 11 Pro 24H2
v2rayNG Version: 7.12.5
Xray Version: 25.5.16
Regional Preset: Full Russia configuration, UTF-8 encoded JSON
Observed Behavior:
Under v2rayNG 7.9.3 (with its corresponding Xray), the Russia Preset loads and works without issues.
Starting from v2rayNG 7.10.0, loading the same Preset immediately triggers the above unexpected EOF error at service startup, rendering VPN unusable.
The JSON syntax of the Preset has been validated (online JSON validators, jq . config.json), and it works in older versions, implying that the problem lies in the newer Xray/v2rayNG parsing logic or boundary checking.
Expected Behavior:
We hope the developers correct the parsing logic to fully support older Russia regional Presets without crashing on “slice length” or “EOF” errors. In future releases, we expect compatibility to be restored so that users can continue leveraging complete Russia node lists.
Suggestions & Requests:
Investigate and fix Xray’s handling of large arrays or nested structures in routing.rules, particularly the boundary checks causing “slice length” errors.
Include compatibility test cases for existing regional Presets (e.g., Russia) to ensure they aren’t broken by new parser changes.
If introducing new Preset schema or field changes, please document them clearly and provide a migration guide for users.
Thank you for the hard work, and we look forward to seeing this issue resolved in an upcoming release so that the Russia regional Preset can be used seamlessly again.
Beta Was this translation helpful? Give feedback.
All reactions