From 1498e69e46c0fd7e2e52ec43a081226fb772faf5 Mon Sep 17 00:00:00 2001 From: Qu Xuan Date: Wed, 30 Jun 2021 19:58:50 +0800 Subject: [PATCH] fix(webconsole): aliyun vnc windows ctl+alt+del --- pkg/webconsole/options/options.go | 1 + pkg/webconsole/session/remote_console.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/webconsole/options/options.go b/pkg/webconsole/options/options.go index 278865688b..da09fd357c 100644 --- a/pkg/webconsole/options/options.go +++ b/pkg/webconsole/options/options.go @@ -31,6 +31,7 @@ type WebConsoleOptions struct { SshpassToolPath string `help:"sshpass tool binary path used to connect server sol" default:"/usr/bin/sshpass"` EnableAutoLogin bool `help:"allow webconsole to log in directly with the cloudroot public key" default:"false"` ApsaraConsoleAddr string `help:"Apsara console addr" default:"https://xxxx.com.cn/module/ecs/vnc/index.html"` + AliyunVncVersion string `help:"Aliyun vnc version" default:"0.0.8"` } func OnOptionsChange(oldO, newO interface{}) bool { diff --git a/pkg/webconsole/session/remote_console.go b/pkg/webconsole/session/remote_console.go index e624e11575..9a136e51db 100644 --- a/pkg/webconsole/session/remote_console.go +++ b/pkg/webconsole/session/remote_console.go @@ -159,11 +159,11 @@ func (info *RemoteConsoleInfo) getQcloudURL() (string, error) { } func (info *RemoteConsoleInfo) getAliyunURL() (string, error) { - isWindows := "False" + isWindows := "false" if info.OsName == "Windows" { - isWindows = "True" + isWindows = "true" } - base := "https://g.alicdn.com/aliyun/ecs-console-vnc2/0.0.5/index.html" + base := fmt.Sprintf("https://g.alicdn.com/aliyun/ecs-console-vnc2/%s/index.html", options.Options.AliyunVncVersion) params := url.Values{ "vncUrl": {info.Url}, "instanceId": {info.InstanceId},