mirror of
https://github.com/XrayR-project/XrayR.git
synced 2025-06-30 08:09:49 +00:00
fix: fix bug when parsing transport protocol
This commit is contained in:
parent
529eb46ea0
commit
fa51cb5309
@ -775,21 +775,21 @@ func (c *APIClient) ParseSSPanelNodeInfo(nodeInfoResponse *NodeInfoResponse) (*a
|
||||
|
||||
if c.NodeType == "Trojan" {
|
||||
EnableTLS = true
|
||||
TLSType = nodeConfig.Security // try to read security from config
|
||||
TLSType = "tls"
|
||||
transportProtocol = "tcp"
|
||||
|
||||
// Select security type
|
||||
if nodeConfig.EnableXtls == "1" {
|
||||
TLSType = "xtls"
|
||||
}
|
||||
if TLSType == "" {
|
||||
TLSType = "tls" // default
|
||||
} else if nodeConfig.Security != "" {
|
||||
TLSType = nodeConfig.Security // try to read security from config
|
||||
}
|
||||
|
||||
// Select transport protocol
|
||||
transportProtocol = nodeConfig.Network // try to read transport protocol from config
|
||||
if nodeConfig.Grpc == "1" {
|
||||
transportProtocol = "grpc"
|
||||
}
|
||||
if nodeConfig.Network != "" {
|
||||
transportProtocol = "tcp" // default
|
||||
} else if nodeConfig.Network != "" {
|
||||
transportProtocol = nodeConfig.Network // try to read transport protocol from config
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user