fix: build trojan error

This commit is contained in:
cubemaze 2023-06-07 20:01:58 +08:00
parent 925542b515
commit 417a857f3d

View File

@ -202,6 +202,9 @@ func buildTrojan(config *conf.ControllerConfig, nodeInfo *panel.NodeInfo, inboun
s := []byte("{}")
inbound.Settings = (*json.RawMessage)(&s)
}
if nodeInfo.Network == "" {
nodeInfo.Network = "tcp"
}
t := coreConf.TransportProtocol(nodeInfo.Network)
inbound.StreamSetting = &coreConf.StreamConfig{Network: &t}
return nil