mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-12-24 11:51:13 +08:00
refactor: split connect and proxy mode (#495)
This commit is contained in:
@@ -106,7 +106,7 @@ func (option *Options) Connect(ctx context.Context, sshConfig *pkgssh.SshConfig,
|
||||
}
|
||||
// not needs to ssh jump in daemon, because dev mode will hang up until user exit,
|
||||
// so just ssh jump in client is enough
|
||||
req := &rpc.ConnectRequest{
|
||||
req := &rpc.ProxyRequest{
|
||||
KubeconfigBytes: string(kubeConfigBytes),
|
||||
Namespace: ns,
|
||||
Headers: option.Headers,
|
||||
@@ -131,7 +131,7 @@ func (option *Options) Connect(ctx context.Context, sshConfig *pkgssh.SshConfig,
|
||||
_ = util.PrintGRPCStream[rpc.DisconnectResponse](resp)
|
||||
return nil
|
||||
})
|
||||
var resp rpc.Daemon_ConnectClient
|
||||
var resp rpc.Daemon_ProxyClient
|
||||
resp, err = daemonCli.Proxy(ctx, req)
|
||||
if err != nil {
|
||||
plog.G(ctx).Errorf("Connect to cluster error: %s", err.Error())
|
||||
|
||||
Reference in New Issue
Block a user