Skip to content

Commit

Permalink
fix(webconsole): sangfor vnc (#20562)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioito authored Jun 17, 2024
1 parent a31c6f9 commit 9eef136
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/climc/shell/misc/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ func init() {
"qingcloud",
"volcengine",
"oraclecloud",
"sangfor",
}

const (
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/webconsole/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ const (
CLOUDPODS = "cloudpods"
PROXMOX = "proxmox"
VOLC_ENGINE = "volcengine"
SANGFOR = "sangfor"
)
1 change: 1 addition & 0 deletions pkg/webconsole/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion pkg/webconsole/session/remote_console.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const (
CLOUDPODS = api.CLOUDPODS
PROXMOX = api.PROXMOX
VOLCENGINE = api.VOLC_ENGINE
SANGFOR = api.SANGFOR
)

type RemoteConsoleInfo struct {
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 9eef136

Please sign in to comment.