Skip to content

DNS配置程序启动导致panic #529

@darren

Description

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

d8c03f1

  1. 客户端配置:

这是最简的配置,出问题的就是在以下这几行配置
这个配置之前的版本是没有问题的

{
    "dns": {
    "servers": [
      "8.8.8.8",
      "localhost"
    ]
  }
}
  1. 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
v2ray.com/core/app/dns.New.func1(0xf7ca80, 0xc000010b98, 0x0, 0x0, 0x1)
        v2ray.com/core/app/dns/dns.go:85 +0x96
v2ray.com/core/app/dns.NewClient.func1(0x7f1a31e6d498, 0xc00024cf00, 0x0, 0x0)
        v2ray.com/core/app/dns/nameserver.go:107 +0x3ec
reflect.Value.call(0xd02bc0, 0xc00024d180, 0x13, 0xe5d582, 0x4, 0xc000279740, 0x1, 0x1, 0x1, 0x0, ...)
        reflect/value.go:476 +0x8c7
reflect.Value.Call(0xd02bc0, 0xc00024d180, 0x13, 0xc000279740, 0x1, 0x1, 0x0, 0x1, 0x1)
        reflect/value.go:337 +0xb9
v2ray.com/core.(*resolution).resolve(0xc000269938, 0xc00024cfc0, 0x4, 0x4, 0x1, 0xc0002b4aa0, 0x0)
        v2ray.com/core/v2ray.go:74 +0x605
v2ray.com/core.(*Instance).RequireFeatures(0xc00008b9a0, 0xd02bc0, 0xc00024d180, 0x14abd01, 0xc00024d180)
        v2ray.com/core/v2ray.go:281 +0x259
v2ray.com/core.RequireFeatures(0xf88060, 0xc0002be1e0, 0xd02bc0, 0xc00024d180, 0x30, 0xdc1de0)
        v2ray.com/core/v2ray.go:155 +0x57
v2ray.com/core/app/dns.NewClient(0xf88060, 0xc0002be1e0, 0xc0002bacf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0002be4b0, ...)
        v2ray.com/core/app/dns/nameserver.go:70 +0x12f
v2ray.com/core/app/dns.New(0xf88060, 0xc0002be1e0, 0xc0001b8e60, 0xf8007f1a5b30b108, 0x2, 0xc0001f8fa0)
        v2ray.com/core/app/dns/dns.go:97 +0x592
v2ray.com/core/app/dns.init.1.func1(0xf88060, 0xc0002be1e0, 0xe00520, 0xc0001b8e60, 0xc000269c01, 0x40fbb8, 0x30, 0xde4940)
        v2ray.com/core/app/dns/dns.go:247 +0x54
v2ray.com/core/common.CreateObject(0xf88060, 0xc0002be1e0, 0xe00520, 0xc0001b8e60, 0xda0aa0, 0xc00008b9a0, 0xf88060, 0xc0002be1e0)
        v2ray.com/core/common/type.go:32 +0x22d
v2ray.com/core.CreateObject(0xc00008b9a0, 0xe00520, 0xc0001b8e60, 0x0, 0x0, 0x1, 0x0)
        v2ray.com/core/functions.go:21 +0x51
v2ray.com/core.initInstanceWithConfig(0xc000271170, 0xc00008b9a0, 0x0, 0x0, 0xd09e01)
        v2ray.com/core/v2ray.go:196 +0xdf
v2ray.com/core.New(0xc000271170, 0x4, 0x7ffc6bfc336a, 0x17)
        v2ray.com/core/v2ray.go:164 +0x77
main.startV2Ray(0xc0000802a0, 0xc0000320a0, 0x2, 0x2)
        v2ray.com/core/main/main.go:115 +0x30e
main.main()
        v2ray.com/core/main/main.go:139 +0xb1

@Vigilans

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions