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},