feat: saved SSH hosts per user, the way in sealed with AES-GCM under a server key kept beside the database

This commit is contained in:
redtea committed 2026-10-15 22:18:27 +03:00
1 parent 1f930e5aea
commit 94bf292494
10 files changed
+347 -7

No files matched your search

+4
View File
@@ -41,6 +41,10 @@ func (s *Server) handlePanelOpen(w http.ResponseWriter, r *http.Request) {
return
}
}
if err := s.fillSaved(s.currentAdmin(r).ID, body.SSH); err != nil {
writeJSON(w, map[string]any{"error": err.Error()})
return
}
if t := body.SSH; t != nil {
t.Host, t.User = strings.TrimSpace(t.Host), strings.TrimSpace(t.User)
if t.Port == 0 {