diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2026-03-07 23:09:54 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@tailscale.com> | 2026-03-07 23:17:07 +0000 |
| commit | ea5aaeb32446649434be863949295fe830132751 (patch) | |
| tree | ab28ac254d9c44c48d725a84b1c5431cce97dd78 | |
| parent | 7b081a98bdbce817a2b3e7929d6a8c7f1c551b35 (diff) | |
| download | tailscale-dctp.tar.xz tailscale-dctp.zip | |
ssh/tailssh: add DCTP hooksdctp
Updates tailscale/corp#24454
| -rw-r--r-- | ssh/tailssh/tailssh.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ssh/tailssh/tailssh.go b/ssh/tailssh/tailssh.go index debad2b5c..fabbe6035 100644 --- a/ssh/tailssh/tailssh.go +++ b/ssh/tailssh/tailssh.go @@ -106,6 +106,23 @@ func (srv *server) now() time.Time { return time.Now() } +type dctpHooks struct{} // see tailscale/corp#24454 + +// DCTP contains hooks for an external project. +// See tailscale/corp#24454. +var DCTP dctpHooks + +// NewServer returns an SSH connection handler for the given backend. +// The backend must implement the ipnLocalBackend interface defined in +// this package. +func (dctpHooks) NewServer(logf logger.Logf, lb any) func(net.Conn) error { + srv := &server{ + logf: logf, + lb: lb.(ipnLocalBackend), + } + return srv.HandleSSHConn +} + func init() { ipnlocal.RegisterNewSSHServer(func(logf logger.Logf, lb *ipnlocal.LocalBackend) (ipnlocal.SSHServer, error) { tsd, err := os.Executable() |
