2dust / v2rayN

A GUI client for Windows, support Xray core and v2fly core and others
https://1.2345345.xyz
GNU General Public License v3.0
67.64k stars 11.27k forks source link

[Bug]: v2rayN 5.39,使用自定义配置用 hysteria,Xray-core 1.7.1 报错 Failed to start: main: failed to load config files #3009

Closed chika0801 closed 1 year ago

chika0801 commented 1 year ago

预期情况

使用自定义配置,用 hysteria,hysteria.exe 1.3.2,配置是

{
    "protocol": "udp",
    "server": "VPS的IP:16384",
    "server_name": "域名",
    "insecure": false,
    "alpn": "h3",
    "resolver": "223.5.5.5",
    "resolve_preference": "4",
    "recv_window_conn": 26843545,
    "recv_window": 67108864,
    "up_mbps": 40,
    "down_mbps": 300,
    "auth_str": "chika",
    "fast_open": true,
    "socks5": {
        "listen": "127.0.0.1:50000"
    }
}

v2rayN 5.39 用 Xray-core 1.7.1,自定义配置正常启动

实际情况

报错内容为

A unified platform for anti-censorship.
Failed to start: main: failed to load config files: [stdin:] > CreateFile stdin:: The filename, directory name, or volume label syntax is incorrect.

复现方法

使用 Xray-core 1.7.1 出错,退回 1.7.0 正常

日志信息

2023-01-07 11:14:19,001 [5] DEBUG Log2 - Input string '1.1.1.1' is not a valid number. Path '', line 1, position 7.
2023-01-07 11:14:19,001 [5] DEBUG Log2 - Newtonsoft.Json.JsonReaderException: Input string '1.1.1.1' is not a valid number. Path '', line 1, position 7.
   在 Newtonsoft.Json.JsonTextReader.ParseReadNumber(ReadType readType, Char firstChar, Int32 initialPosition)
   在 Newtonsoft.Json.JsonTextReader.ParseValue()
   在 Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
   在 Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
   在 v2rayN.Utils.ParseJson(String strJson)
2023-01-07 11:14:19,218 [5] DEBUG Log2 - 
2023-01-07 11:14:19,218 [5] DEBUG Log2 - System.Exception
   在 v2rayN.Handler.V2rayHandler.V2rayStartNew(String configStr)

额外信息

如果是只添加如 VLESS TCP TLS Vision,使用 Xray-core 1.7.1 则正常

我确认已更新至最新版本

我确认已查询历史issues

2dust commented 1 year ago

是因为xray-core的读取文件行为改变了 这个麻烦,需要重写调用core的功能

chika0801 commented 1 year ago

是因为xray-core的读取文件行为改变了 这个麻烦,需要重写调用core的功能

https://github.com/XTLS/Xray-core/pull/1482#issuecomment-1374509503 xray-core那边在处理了

chika0801 commented 1 year ago

使用 https://github.com/XTLS/Xray-core/actions/runs/3862678869 里面的xray.exe测试,问题已解决