Merge pull request #65 from stitchrs/trojan

fix: build trojan error
This commit is contained in:
Yuzuki 2023-06-08 01:20:00 +08:00 committed by GitHub
commit 244b370004
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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