support sudo configuration and daemon mode

This commit is contained in:
miloschwartz
2026-02-20 20:42:42 -08:00
parent 5d04be92f7
commit 556be90b7e
4 changed files with 194 additions and 88 deletions

View File

@@ -13,8 +13,10 @@ func (s *Server) registerRoutes() {
// ConnectionMetadata is the metadata object in POST /connection.
type ConnectionMetadata struct {
Sudo bool `json:"sudo"`
Homedir bool `json:"homedir"`
SudoMode string `json:"sudoMode"` // "none" | "full" | "commands"
SudoCommands []string `json:"sudoCommands"` // used when sudoMode is "commands"
Homedir bool `json:"homedir"`
Groups []string `json:"groups"` // system groups to add the user to
}
// ConnectionRequest is the JSON body for POST /connection.