From 7e788b3b34cb37b90e7c80de3ff44e69d1473be8 Mon Sep 17 00:00:00 2001 From: yuzuki999 Date: Wed, 30 Aug 2023 15:48:40 +0800 Subject: [PATCH] fix panic --- core/xray/inbound.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/xray/inbound.go b/core/xray/inbound.go index 5671cc2..6135e14 100644 --- a/core/xray/inbound.go +++ b/core/xray/inbound.go @@ -38,8 +38,6 @@ func buildInbound(option *conf.Options, nodeInfo *panel.NodeInfo, tag string) (* return nil, err } // Set network protocol - t := coreConf.TransportProtocol(network) - in.StreamSetting = &coreConf.StreamConfig{Network: &t} // Set server port in.PortList = &coreConf.PortList{ Range: []coreConf.PortRange{ @@ -170,6 +168,9 @@ func buildV2ray(config *conf.Options, nodeInfo *panel.NodeInfo, inbound *coreCon if len(v.NetworkSettings) == 0 { return nil } + + t := coreConf.TransportProtocol(nodeInfo.VAllss.Network) + inbound.StreamSetting = &coreConf.StreamConfig{Network: &t} switch v.Network { case "tcp": err := json.Unmarshal(v.NetworkSettings, &inbound.StreamSetting.TCPSettings)