ssh/tailssh: add a new sshSession type to clean up existing+future code
Updates #3802 Change-Id: I7054dca387f5e5aee1185937ecf41b77a5a07f1a Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> Co-authored-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
462e75666b
commit
6e86bbcb06
@ -9,7 +9,6 @@ package tailssh
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
@ -211,10 +210,9 @@ func TestSSH(t *testing.T) {
|
||||
uprof: &tailcfg.UserProfile{},
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
ss.Handler = func(s ssh.Session) {
|
||||
srv.handleAcceptedSSH(ctx, s, ci, u)
|
||||
ss := srv.newSSHSession(s, ci, u, &tailcfg.SSHAction{Accept: true})
|
||||
ss.run()
|
||||
}
|
||||
|
||||
ln, err := net.Listen("tcp4", "127.0.0.1:0")
|
||||
|
Reference in New Issue
Block a user