fix(webconsole): sangfor vnc (#20562)

This commit is contained in:
屈轩
2024-06-17 20:43:49 +08:00
committed by GitHub
parent a31c6f961d
commit 9eef13609b
4 changed files with 5 additions and 1 deletions
+1
View File
@@ -101,6 +101,7 @@ func init() {
"qingcloud",
"volcengine",
"oraclecloud",
"sangfor",
}
const (
+1
View File
@@ -38,4 +38,5 @@ const (
CLOUDPODS = "cloudpods"
PROXMOX = "proxmox"
VOLC_ENGINE = "volcengine"
SANGFOR = "sangfor"
)
+1
View File
@@ -62,6 +62,7 @@ func (s *ConnectionServer) ServeHTTP(w http.ResponseWriter, req *http.Request) {
if utils.IsInStringArray(info.Hypervisor, []string{
api.HYPERVISOR_OPENSTACK,
api.HYPERVISOR_CTYUN,
api.HYPERVISOR_SANGFOR,
}) {
srv, err = NewWebsocketProxyServer(sessionObj)
} else {
+2 -1
View File
@@ -50,6 +50,7 @@ const (
CLOUDPODS = api.CLOUDPODS
PROXMOX = api.PROXMOX
VOLCENGINE = api.VOLC_ENGINE
SANGFOR = api.SANGFOR
)
type RemoteConsoleInfo struct {
@@ -128,7 +129,7 @@ func (info *RemoteConsoleInfo) GetConnectParams() (string, error) {
return info.getQcloudURL()
case CLOUDPODS:
return info.getCloudpodsURL()
case OPENSTACK, VMRC, ZSTACK, CTYUN, HUAWEI, HCS, JDCLOUD, PROXMOX:
case OPENSTACK, VMRC, ZSTACK, CTYUN, HUAWEI, HCS, JDCLOUD, PROXMOX, SANGFOR:
return info.Url, nil
case VOLCENGINE:
return info.getVolcEngineURL()