feat: disconnect works well

This commit is contained in:
fengcaiwen
2023-10-25 20:05:48 +08:00
committed by naison
parent fec1f72b22
commit 1f4ea3ba87
11 changed files with 322 additions and 231 deletions

View File

@@ -49,11 +49,12 @@ func (svr *Server) Proxy(req *rpc.ConnectRequest, resp rpc.Daemon_ProxyServer) e
Name: "kubeconfig",
DefValue: file,
})
err = handler.SshJumpAndSetEnv(ctx, sshConf, flags, false)
var path string
path, err = handler.SshJump(ctx, sshConf, flags, false)
if err != nil {
return err
}
err = connect.InitClient(InitFactory(req.KubeconfigBytes, req.Namespace))
err = connect.InitClient(InitFactoryByPath(path, req.Namespace))
if err != nil {
return err
}