mirror of
https://github.com/XrayR-project/XrayR.git
synced 2025-08-22 17:21:46 +00:00
feat: add support for customize transport protocol
This commit is contained in:
@@ -774,20 +774,23 @@ func (c *APIClient) ParseSSPanelNodeInfo(nodeInfoResponse *NodeInfoResponse) (*a
|
||||
}
|
||||
|
||||
if c.NodeType == "Trojan" {
|
||||
transportProtocol = nodeConfig.Network
|
||||
TLSType = nodeConfig.Security
|
||||
if nodeConfig.Grpc == "1" {
|
||||
transportProtocol = "grpc"
|
||||
EnableTLS = true
|
||||
TLSType = "tls"
|
||||
} else {
|
||||
transportProtocol = "tcp"
|
||||
EnableTLS = true
|
||||
TLSType = "tls"
|
||||
}
|
||||
TLSType = nodeConfig.Security // try to read security from config
|
||||
if nodeConfig.EnableXtls == "1" {
|
||||
TLSType = "xtls"
|
||||
}
|
||||
if TLSType == "" {
|
||||
TLSType = "tls" // default
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
}
|
||||
|
||||
// Create GeneralNodeInfo
|
||||
|
Reference in New Issue
Block a user