mirror of
https://github.com/XrayR-project/XrayR.git
synced 2025-06-30 16:19:50 +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" {
|
if c.NodeType == "Trojan" {
|
||||||
EnableTLS = true
|
EnableTLS = true
|
||||||
TLSType = nodeConfig.Security // try to read security from config
|
TLSType = "tls"
|
||||||
|
transportProtocol = "tcp"
|
||||||
|
|
||||||
|
// Select security type
|
||||||
if nodeConfig.EnableXtls == "1" {
|
if nodeConfig.EnableXtls == "1" {
|
||||||
TLSType = "xtls"
|
TLSType = "xtls"
|
||||||
}
|
} else if nodeConfig.Security != "" {
|
||||||
if TLSType == "" {
|
TLSType = nodeConfig.Security // try to read security from config
|
||||||
TLSType = "tls" // default
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Select transport protocol
|
// Select transport protocol
|
||||||
transportProtocol = nodeConfig.Network // try to read transport protocol from config
|
|
||||||
if nodeConfig.Grpc == "1" {
|
if nodeConfig.Grpc == "1" {
|
||||||
transportProtocol = "grpc"
|
transportProtocol = "grpc"
|
||||||
}
|
} else if nodeConfig.Network != "" {
|
||||||
if nodeConfig.Network != "" {
|
transportProtocol = nodeConfig.Network // try to read transport protocol from config
|
||||||
transportProtocol = "tcp" // default
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user