diff --git a/api/sspanel/model.go b/api/sspanel/model.go index 1773fee..998ec30 100644 --- a/api/sspanel/model.go +++ b/api/sspanel/model.go @@ -21,11 +21,7 @@ type CustomConfig struct { OffsetPortNode string `json:"offset_port_node"` ServerSub string `json:"server_sub"` Host string `json:"host"` - MuPort string `json:"mu_port"` - MuEncryption string `json:"mu_encryption"` - MuProtocol string `json:"mu_protocol"` - MuObfs string `json:"mu_obfs"` - MuSuffix string `json:"mu_suffix"` + Method string `json:"method"` V2Port string `json:"v2_port"` TLS string `json:"tls"` EnableVless string `json:"enable_vless"` @@ -38,7 +34,6 @@ type CustomConfig struct { Header json.RawMessage `json:"header"` TrojanPort string `json:"trojan_port"` AllowInsecure string `json:"allow_insecure"` - Grpc string `json:"grpc"` Servicename string `json:"servicename"` EnableXtls string `json:"enable_xtls"` Flow string `json:"flow"` diff --git a/api/sspanel/sspanel.go b/api/sspanel/sspanel.go index bd7fe3d..637adb5 100644 --- a/api/sspanel/sspanel.go +++ b/api/sspanel/sspanel.go @@ -768,6 +768,7 @@ func (c *APIClient) ParseSSPanelNodeInfo(nodeInfoResponse *NodeInfoResponse) (*a } parsedPort, err := strconv.ParseInt(nodeConfig.OffsetPortNode, 10, 32) + if err != nil { return nil, err } @@ -780,6 +781,7 @@ func (c *APIClient) ParseSSPanelNodeInfo(nodeInfoResponse *NodeInfoResponse) (*a if c.NodeType == "V2ray" { transportProtocol = nodeConfig.Network TLSType = nodeConfig.Security + if parsedAlterID, err := strconv.ParseInt(nodeConfig.AlterID, 10, 16); err != nil { return nil, err } else { @@ -789,6 +791,7 @@ func (c *APIClient) ParseSSPanelNodeInfo(nodeInfoResponse *NodeInfoResponse) (*a if TLSType == "tls" || TLSType == "xtls" { EnableTLS = true } + if nodeConfig.EnableVless == "1" { EnableVless = true } @@ -807,9 +810,7 @@ func (c *APIClient) ParseSSPanelNodeInfo(nodeInfoResponse *NodeInfoResponse) (*a } // Select transport protocol - if nodeConfig.Grpc == "1" { - transportProtocol = "grpc" - } else if nodeConfig.Network != "" { + if nodeConfig.Network != "" { transportProtocol = nodeConfig.Network // try to read transport protocol from config } } @@ -827,7 +828,7 @@ func (c *APIClient) ParseSSPanelNodeInfo(nodeInfoResponse *NodeInfoResponse) (*a EnableTLS: EnableTLS, EnableVless: EnableVless, VlessFlow: nodeConfig.Flow, - CypherMethod: nodeConfig.MuEncryption, + CypherMethod: nodeConfig.Method, ServiceName: nodeConfig.Servicename, Header: nodeConfig.Header, }