From af9d9094e78715f1c5c7280274537c3e8024b4ec Mon Sep 17 00:00:00 2001 From: Alex Kim Date: Sat, 4 Nov 2023 00:04:25 -0700 Subject: [PATCH] add TLSServerName --- pkg/handler/connect.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/handler/connect.go b/pkg/handler/connect.go index 909728e3..7aa8338f 100644 --- a/pkg/handler/connect.go +++ b/pkg/handler/connect.go @@ -911,6 +911,10 @@ func SshJump(ctx context.Context, conf *util.SshConfig, flags *pflag.FlagSet, pr } rawConfig.Clusters[rawConfig.Contexts[rawConfig.CurrentContext].Cluster].Server = fmt.Sprintf("%s://%s", u.Scheme, local.String()) + rawConfig.Clusters[rawConfig.Contexts[rawConfig.CurrentContext].Cluster].TLSServerName = serverHost + // To Do: add cli option to skip tls verify + // rawConfig.Clusters[rawConfig.Contexts[rawConfig.CurrentContext].Cluster].CertificateAuthorityData = nil + // rawConfig.Clusters[rawConfig.Contexts[rawConfig.CurrentContext].Cluster].InsecureSkipTLSVerify = true rawConfig.SetGroupVersionKind(schema.GroupVersionKind{Version: clientcmdlatest.Version, Kind: "Config"}) var convertedObj runtime.Object