@@ -53,7 +53,7 @@ type HostAgent struct {
53
53
instName string
54
54
instSSHAddress string
55
55
sshConfig * ssh.SSHConfig
56
- portForwarder * portForwarder
56
+ portForwarder * portForwarder // legacy SSH port forwarder (deprecated)
57
57
grpcPortForwarder * portfwd.Forwarder
58
58
59
59
onClose []func () error // LIFO
@@ -644,9 +644,12 @@ func (a *HostAgent) processGuestAgentEvents(ctx context.Context, client *guestag
644
644
for _ , f := range ev .Errors {
645
645
logrus .Warnf ("received error from the guest: %q" , f )
646
646
}
647
- // useSSHFwd was false by default in v1.0, but reverted to true by default in v1.0.1
648
- // due to stability issues
649
- useSSHFwd := true
647
+ // History of the default value of useSSHFwd:
648
+ // - v0.1.0: true (effectively)
649
+ // - v1.0.0: false
650
+ // - v1.0.1: true
651
+ // - v1.1.0-beta.0: false
652
+ useSSHFwd := false
650
653
if envVar := os .Getenv ("LIMA_SSH_PORT_FORWARDER" ); envVar != "" {
651
654
b , err := strconv .ParseBool (os .Getenv ("LIMA_SSH_PORT_FORWARDER" ))
652
655
if err != nil {
@@ -656,6 +659,7 @@ func (a *HostAgent) processGuestAgentEvents(ctx context.Context, client *guestag
656
659
}
657
660
}
658
661
if useSSHFwd {
662
+ logrus .Warn ("LIMA_SSH_PORT_FORWARDER is deprecated" )
659
663
a .portForwarder .OnEvent (ctx , ev )
660
664
} else {
661
665
a .grpcPortForwarder .OnEvent (ctx , client , ev )
0 commit comments