Skip to content

Commit f48a23c

Browse files
authored
fix(region): aliyun vnc addr (#23883)
1 parent 6af0bd4 commit f48a23c

File tree

6 files changed

+11
-19
lines changed

6 files changed

+11
-19
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ require (
9898
k8s.io/cri-api v0.28.15
9999
k8s.io/klog/v2 v2.20.0
100100
moul.io/http2curl/v2 v2.3.0
101-
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251130090640-988b91734be4
101+
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251202110347-66e60ae88e4f
102102
yunion.io/x/executor v0.0.0-20250518005516-5402e9e0bed0
103103
yunion.io/x/jsonutils v1.0.1-0.20250507052344-1abcf4f443b1
104104
yunion.io/x/log v1.0.1-0.20240305175729-7cf2d6cd5a91

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,8 +1661,8 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK
16611661
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
16621662
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
16631663
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
1664-
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251130090640-988b91734be4 h1:FsVs00YbXgtIAkG5vKlsuv3SJXFLQpyqRvRlaY4sc4I=
1665-
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251130090640-988b91734be4/go.mod h1:aWRX5Phwz3nbHUNnIAm1oVogjguXPYDDgCOy/9Hnnvk=
1664+
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251202110347-66e60ae88e4f h1:XbF3dPkwrLs9ndX8QP23EGFljbnkII76UjPDKeIJvhA=
1665+
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251202110347-66e60ae88e4f/go.mod h1:aWRX5Phwz3nbHUNnIAm1oVogjguXPYDDgCOy/9Hnnvk=
16661666
yunion.io/x/executor v0.0.0-20250518005516-5402e9e0bed0 h1:msG4SiDSVU7CrXH06WuHlNEZXIooTcmNbfrIGHuIHBU=
16671667
yunion.io/x/executor v0.0.0-20250518005516-5402e9e0bed0/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
16681668
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=

pkg/webconsole/options/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type WebConsoleOptions struct {
3030
IpmitoolPath string `help:"ipmitool binary path used to connect baremetal sol" default:"/usr/bin/ipmitool"`
3131
EnableAutoLogin bool `help:"allow webconsole to log in directly with the cloudroot public key" default:"false"`
3232
ApsaraConsoleAddr string `help:"Apsara console addr" default:"https://xxxx.com.cn/module/ecs/vnc/index.html"`
33-
AliyunConsoleAddr string `help:"Aliyun vnc addr" default:"https://ecs.console.aliyun.com/vnc/index.htm"`
33+
AliyunConsoleAddr string `help:"Aliyun vnc addr" default:"https://g.alicdn.com/aliyun/ecs-console-vnc2/0.0.8/index.html"`
3434

3535
SshSessionTimeoutMinutes int `help:"ssh timeout session" default:"-1"`
3636
RdpSessionTimeoutMinutes int `help:"rdp timeout session" default:"-1"`

pkg/webconsole/session/remote_console.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"fmt"
2020
"net/url"
2121
"os/exec"
22+
"strings"
2223

2324
"yunion.io/x/cloudmux/pkg/cloudprovider"
2425
"yunion.io/x/jsonutils"
@@ -172,16 +173,14 @@ func (info *RemoteConsoleInfo) getQcloudURL() (string, error) {
172173

173174
func (info *RemoteConsoleInfo) getAliyunURL() (string, error) {
174175
isWindows := "false"
175-
if info.OsName == "Windows" {
176+
if strings.EqualFold(info.OsName, "windows") {
176177
isWindows = "true"
177178
}
178-
params := url.Values{
179-
"vncUrl": {info.Url},
180-
"instanceId": {info.InstanceId},
181-
"isWindows": {isWindows},
182-
"password": {info.Password},
179+
vncUrl, err := url.QueryUnescape(info.Url)
180+
if err != nil {
181+
return "", errors.Wrap(err, "url.QueryUnescape")
183182
}
184-
return info.getConnParamsURL(options.Options.AliyunConsoleAddr, params), nil
183+
return fmt.Sprintf("%s?vncUrl=%s&instanceId=%s&isWindows=%s", options.Options.AliyunConsoleAddr, vncUrl, info.InstanceId, isWindows), nil
185184
}
186185

187186
func (info *RemoteConsoleInfo) getCloudpodsURL() (string, error) {

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2243,7 +2243,7 @@ sigs.k8s.io/structured-merge-diff/v4/value
22432243
# sigs.k8s.io/yaml v1.2.0
22442244
## explicit; go 1.12
22452245
sigs.k8s.io/yaml
2246-
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251130090640-988b91734be4
2246+
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251202110347-66e60ae88e4f
22472247
## explicit; go 1.24
22482248
yunion.io/x/cloudmux/pkg/apis
22492249
yunion.io/x/cloudmux/pkg/apis/billing

vendor/yunion.io/x/cloudmux/pkg/multicloud/aliyun/instance.go

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)