XrayR-project / XrayR

A Xray backend framework that can easily support many panels. 一个基于Xray的后端框架,支持V2ay,Trojan,Shadowsocks协议,极易扩展,支持多面板对接
https://xrayr-project.github.io/XrayR-doc/
Mozilla Public License 2.0
2.1k stars 839 forks source link

trojan启动报错 #697

Open tempwswm opened 2 weeks ago

tempwswm commented 2 weeks ago

报错信息

Oct 12 21:05:00 debian12 XrayR[2487]: XrayR 0.9.4 (A Xray backend that supports many panels)
Oct 12 21:05:00 debian12 XrayR[2487]: time="2024-10-12T21:05:00+08:00" level=info msg="Start the panel.."
Oct 12 21:05:00 debian12 XrayR[2487]: 2024/10/12 21:05:00 [Warning] core: Xray 1.8.20 started
Oct 12 21:05:00 debian12 XrayR[2487]: panic: runtime error: invalid memory address or nil pointer dereference
Oct 12 21:05:00 debian12 XrayR[2487]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x3345e19]
Oct 12 21:05:00 debian12 XrayR[2487]: goroutine 1 [running]:
Oct 12 21:05:00 debian12 XrayR[2487]: github.com/XrayR-project/XrayR/service/controller.InboundBuilder(0xc0019c7830, 0xc0019b7a00, {0xc0014fdc50, 0x13})
Oct 12 21:05:00 debian12 XrayR[2487]:         github.com/XrayR-project/XrayR/service/controller/inboundbuilder.go:248 +0x15f9
Oct 12 21:05:00 debian12 XrayR[2487]: github.com/XrayR-project/XrayR/service/controller.(*Controller).addNewTag(0xc0019957a0, 0xc0019b7a00)
Oct 12 21:05:00 debian12 XrayR[2487]:         github.com/XrayR-project/XrayR/service/controller/controller.go:327 +0x75
Oct 12 21:05:00 debian12 XrayR[2487]: github.com/XrayR-project/XrayR/service/controller.(*Controller).Start(0xc0019957a0)
Oct 12 21:05:00 debian12 XrayR[2487]:         github.com/XrayR-project/XrayR/service/controller/controller.go:93 +0x225
Oct 12 21:05:00 debian12 XrayR[2487]: github.com/XrayR-project/XrayR/panel.(*Panel).Start(0xc001996780)
Oct 12 21:05:00 debian12 XrayR[2487]:         github.com/XrayR-project/XrayR/panel/panel.go:209 +0x5ca
Oct 12 21:05:00 debian12 XrayR[2487]: github.com/XrayR-project/XrayR/cmd.run()
Oct 12 21:05:00 debian12 XrayR[2487]:         github.com/XrayR-project/XrayR/cmd/root.go:106 +0x1c5
Oct 12 21:05:00 debian12 XrayR[2487]: github.com/XrayR-project/XrayR/cmd.init.func1(0xc00196cb00?, {0x445389d?, 0x4?, 0x445378d?})
Oct 12 21:05:00 debian12 XrayR[2487]:         github.com/XrayR-project/XrayR/cmd/root.go:27 +0x13
Oct 12 21:05:00 debian12 XrayR[2487]: github.com/spf13/cobra.(*Command).execute(0x780c840, {0xc0001028e0, 0x2, 0x2})
Oct 12 21:05:00 debian12 XrayR[2487]:         github.com/spf13/cobra@v1.8.0/command.go:987 +0xab1
Oct 12 21:05:00 debian12 XrayR[2487]: github.com/spf13/cobra.(*Command).ExecuteC(0x780c840)
Oct 12 21:05:00 debian12 XrayR[2487]:         github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff
Oct 12 21:05:00 debian12 XrayR[2487]: github.com/spf13/cobra.(*Command).Execute(...)
Oct 12 21:05:00 debian12 XrayR[2487]:         github.com/spf13/cobra@v1.8.0/command.go:1039
Oct 12 21:05:00 debian12 XrayR[2487]: github.com/XrayR-project/XrayR/cmd.Execute(...)
Oct 12 21:05:00 debian12 XrayR[2487]:         github.com/XrayR-project/XrayR/cmd/root.go:120
Oct 12 21:05:00 debian12 XrayR[2487]: main.main()
Oct 12 21:05:00 debian12 XrayR[2487]:         github.com/XrayR-project/XrayR/main.go:10 +0x1a
Oct 12 21:05:00 debian12 systemd[1]: XrayR.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Oct 12 21:05:00 debian12 systemd[1]: XrayR.service: Failed with result 'exit-code'.

我使用的配置文件

ConnectionConfig:
  BufferSize: 64
  ConnIdle: 30
  DownlinkOnly: 4
  Handshake: 4
  UplinkOnly: 2
Log:
  Level: warning
Nodes:
- ApiConfig:
    ApiHost: http://192.168.35.129:7001
    ApiKey: '1234567890123456789'
    DeviceLimit: 0
    EnableVless: false
    EnableXTLS: false
    NodeID: 1
    NodeType: Trojan
    SpeedLimit: 0
    Timeout: 30
  ControllerConfig:
    EnableDNS: false
    EnableFallback: false
    FallBackConfigs:
    - Alpn: null
      Dest: 80
      Path: null
      ProxyProtocolVer: 0
      SNI: null
    ListenIP: 0.0.0.0
    UpdatePeriodic: 10
  PanelType: NewV2board

apiclient获取的nodeinfo(这个是我从http://192.168.35.129:7001/api/v1/server/UniProxy/config?token=1234567890123456789&node_id=1&node_type=trojan 获取的)

{
    "host": "abc.demo.com",
    "server_port": 2345,
    "server_name": "abc.demo.com",
    "network": "ws",
    "networkSettings": {
        "acceptProxyProtocol": "false",
        "path": "/",
        "host": "abc.demo.com"
    },
    "base_config": {
        "push_interval": 60,
        "pull_interval": 60
    }
}

我使用docker安装和一键脚本安装xrayr,都得到相同的结果

mercury7720 commented 2 weeks ago

传输协议用 TCP,然后如果不指定自己的证书也不配置 DNS 自动申请,那么配置文件 ControllerConfig 里的 CertMode 需要设置为 none。