Skip to content

[XHTTP] xray 不工作: default outbound handler not exist + unknown directive "keepalive_time" + invalid port in resolver #4478

Closed Answered by 12Kilowatt
12Kilowatt asked this question in Q&A
Discussion options

You must be logged in to vote

昨天,我决定在等待答案的同时采取行动。如果我尝试其他方法,我有机会修复我的设置。我决定赌一把,买了 IPv4+IPv6 VPS 来验证我的猜测。

我的第一个猜测是我错误地插入了 outbounds 块(这给了我 default outbound handler not exist),但 Xray 启动时并没有说我的配置文件不正确。结果证明这是真的。这次我使用 VSCODE 来简化一堆 {}[][{}{}{[][}[] 的导航并获得正确的配置。在正确的 outbounds 放置下,我的互联网连接成功了,没有任何错误。JSON 太糟糕了……

正确的配置文件 Xray config.json | Correct Xray config.json
{
    "log": {
        "loglevel": "debug",
        "access": "MY PATH/xray_log/access.log",
        "error": "MY PATH/xray_log/error.log",
        "dnsLog": false
    },

  "inbounds": [
    {
      "listen": "0.0.0.0",
      "port": 443,
      "protocol": "vless",
      "settings": {
        "clients": [
          {
            "id": "MY_ID",
            "level": 0,
…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by 12Kilowatt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant