v2ray / v2ray-core

A platform for building proxies to bypass network restrictions.
https://www.v2ray.com/
MIT License
45.29k stars 8.94k forks source link

[Help Request] Config file is a valid json but cannot run #1080

Closed kmahyyg closed 6 years ago

kmahyyg commented 6 years ago

Please skip to the English section below if you don't write Chinese.

1) 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)

V3.21

2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。

正在配置服务端

3) 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)

root@host:~/v2ray# ./v2ray --config ./v2rayserver.json --test
V2Ray v3.21 (die Commanderin) 20180423
A unified platform for anti-censorship.
Main: failed to read config file: ./v2rayserver.json > proto: can't skip unknown wire type 6 for core.Config

4) 你期待看到的正确表现是怎样的?

正常运行

5) 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

请看 Comments 5

客户端配置:

暂未配置

请问配置文件哪里有问题?json is Valid.

kmahyyg commented 6 years ago

image

rufengsuixing commented 6 years ago

请检查一下你提交的issue配置 请好好读文档

kmahyyg commented 6 years ago

抱歉,剪贴板上的数据出了一点点问题,已更新

kmahyyg commented 6 years ago

新配置,报同样的错误,求助。

{
  "log": {
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log",
    "loglevel": "warning"
  },
  "inbound": {
    "port": 89,
    "listen": "127.0.0.1",
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "1baa43f4-0cc6-4053-92",
          "level": 1,
          "security": "auto",
          "alterId": 32
        }
      ]
    },
    "streamSettings": {
      "network": "ws",
      "security": "tls",
      "wsSettings": {
        "path": "/statuscheck",
        "headers": {
          "Host": ""
        }
      },
      "tlsSettings": {
        "certificates": [
          {
            "certificateFile": "/root/fc.pem",
            "keyFile": "/root/pk.pem"
          }
        ]
      }
    },
    "outbound": {
      "protocol": "freedom",
      "settings": {}
    },
    "outboundDetour": [
      {
        "protocol": "blackhole",
        "settings": {},
        "tag": "blocked"
      }
    ],
    "routing": {
      "strategy": "rules",
      "settings": {
        "rules": [
          {
            "type": "field",
            "ip": [
              "0.0.0.0/8",
              "10.0.0.0/8",
              "100.64.0.0/10",
              "127.0.0.0/8",
              "169.254.0.0/16",
              "172.16.0.0/12",
              "192.0.0.0/24",
              "192.0.2.0/24",
              "192.168.0.0/16",
              "198.18.0.0/15",
              "198.51.100.0/24",
              "203.0.113.0/24",
              "::1/128",
              "fc00::/7",
              "fe80::/10"
            ],
            "outboundTag": "blocked"
          }
        ]
      }
    }
  }
}
peter-tank commented 6 years ago

https://codebeautify.org/jsonviewer

层级都错了,inbound应该在outbound前结束。