tailscale: Add tailssh server

This commit is contained in:
世界
2026-05-28 18:42:58 +08:00
parent 01edf1a64b
commit 9ac1e1b6ca
31 changed files with 2863 additions and 3 deletions
+24
View File
@@ -21,6 +21,30 @@ type PlatformInterface interface {
StartNeighborMonitor(listener NeighborUpdateListener) error
CloseNeighborMonitor(listener NeighborUpdateListener) error
RegisterMyInterface(name string)
UsePlatformShell() bool
CheckPlatformShell() error
OpenShellSession(user *PlatformUser, command string, environ StringIterator, term string, rows int32, cols int32) (ShellSession, error)
LookupUser(username string) (*PlatformUser, error)
LookupSFTPServer() (*StringBox, error)
ReadSystemSSHHostKey() (*StringBox, error)
}
type PlatformUser struct {
Username string
Uid int32
Gid int32
HomeDir string
Shell string
groups []int32
}
func (u *PlatformUser) SetGroups(groups Int32Iterator) {
u.groups = iteratorToArray[int32](groups)
}
func (u *PlatformUser) Groups() Int32Iterator {
return newIterator(u.groups)
}
type NeighborUpdateListener interface {