309 Commits
Author SHA1 Message Date
bluebluesoda ebd6e9372e Revert "fix(install): preserve temporary worktrees"
This reverts commit 46df0e5fd2.
2026-08-28 18:09:38 +00:00
bluebluesoda 46df0e5fd2 fix(install): preserve temporary worktrees
- stop deleting /tmp wholesale during ZFS pool sizing\n- clean only stale vpsmgr scratch paths and preserve oneclick installs
2026-08-28 18:07:01 +00:00
bluebluesoda f755823bc1 fix(install): limit header check to Debian
- keep Ubuntu's prebuilt ZFS module path unchanged
2026-08-28 15:50:49 +00:00
bluebluesoda 01db14ef0b fix(install): build ZFS for cloud kernels
- install matching Debian cloud kernel headers\n- detect missing running-kernel headers before DKMS\n- show actionable DKMS build and install errors
2026-08-28 15:50:13 +00:00
bluebluesoda 97396589f5 feat(install): support disabling IPv4 forwarding
- add --disable-v4forward with explicit confirmation\n- skip reserved-port checks and keep Traefik stopped for IPv6-only installs\n- document dedicated-host requirements and sync config references
2026-08-28 15:07:24 +00:00
bluebluesoda 6d897cc1bb feat(install): enforce swap up front, before IPv6 prompts
Move the swap decision to the start of install.sh (before 00-ip-ask).
Swap is now mandatory: if absent, ask the user for a size in GiB
(default decline aborts with a bilingual note pointing at swap files
or systemd-zram-generator). The old optional swap block in
00-check.sh is removed.
2026-08-28 12:36:53 +00:00
bluebluesoda 539dae613e feat(images): bake vpsmgr TCP tuning (BBR + buffers) into every image
All image build scripts now append the TCP tuning sysctls to
/etc/sysctl.conf and run sysctl -p (best-effort) during the build.
Covers 50/eol-debian11/80 (Debian) and 60/70/90 (RHEL/openSUSE/Arch).
2026-08-28 09:58:18 +00:00
bluebluesoda 29db57355b Update README.md 2026-08-28 17:35:38 +08:00
bluebluesoda b8eda138d7 feat(images): add optional EOL Debian 11 sshd image builder
scripts/eol-debian11-image.sh builds vpsmgr/debian-11-sshd from
images:debian/11 (fallback bullseye). Reuses the 50-image.sh slim
tooling and IPv6 on-link fix — systemd 247 on bullseye supports the
full [IPv6AcceptRA] section. Optional, never part of install.sh.
2026-08-28 09:09:57 +00:00
bluebluesoda a3173e18c8 feat(install): add gitless oneclick.sh installer
Downloads the repo as a tarball (no git on host), runs install.sh,
and removes the extracted temp dir on exit. Supports --update /
--local-build passthrough.
2026-08-28 08:56:23 +00:00
bluebluesoda 7c69a533f2 Update README.md 2026-08-28 16:37:57 +08:00
bluebluesoda d221de8754 fix(install): prompt before continuing with <5 GiB free on /
Replace the hard die with a y/N confirmation so users can force
an install on small disks when they understand the risk.
2026-08-28 08:36:29 +00:00
bluebluesoda c156e13322 docs(panel): shorten notes change-password copy to 改密 2026-08-27 08:30:00 +00:00
bluebluesoda 8685645f36 docs(panel): shorten Chinese change-password copy to 改密 2026-08-27 08:29:15 +00:00
bluebluesoda c645f1c0fb fix(panel): strengthen module borders and username emphasis
- Increase user-panel component borders from 2px to 3px
- Make the overview username visibly heavier
- Apply the stronger borders to the login card and input
2026-08-26 19:13:58 +00:00
bluebluesoda 2bd5466e79 fix(panel): strengthen overview module borders 2026-08-26 19:06:25 +00:00
bluebluesoda 7464a10040 feat(panel): default light background is white, not gray
Plain light mode no longer uses a gray-blue page background so the blue
accent cannot blend in; the themed variant tints white instead.
2026-08-26 18:57:46 +00:00
bluebluesoda 01c7299c85 feat(admin): neutral create/change-password buttons; darken light panel bg
- Admin create-user and change-password buttons switch from blue to a neutral
  black-in-light / white-in-dark scheme (shared .neutral class with login-as)
- User panel light background darkened one shade (#f1f5f9 -> #e6ebf1) in the
  overview, login page and themed variant
2026-08-26 18:47:35 +00:00
bluebluesoda de95681073 feat(admin): expand palette to 10 colors; strengthen user-panel theming
- Add vivid blue and fuchsia to the accent palette (5 swatches per row)
- User panel: tint background, cards, borders and code blocks via CSS
  variables plus a 3px colored bar under the title for a stronger cue
2026-08-26 18:35:09 +00:00
bluebluesoda 705b5d5b64 feat(admin): per-user accent color for login button and user panel
- DB v12: users.color column (hex from a fixed 8-color palette, allowlist)
- Admin: click the username to open a swatch picker + clear; colored text/dot
- Login button defaults to neutral black/white; themed when a color is set
- User panel: tint background and accents via CSS variables in both modes
- Document the hidden entry point in READMEs and docs/architecture.md
2026-08-26 18:15:18 +00:00
bluebluesoda 81a3ebc728 fix(admin): unit-aware sort for mem/disk; add bandwidth total sort
- Mem/Disk sort now normalizes KiB/MiB/GiB/... to bytes so e.g. 970 MiB
  sorts above 2 GiB instead of by raw prefix number.
- Bandwidth column becomes sortable, ordered by up+down total for the
  month (BWTotal piped through BatchUsers -> userView).
2026-08-26 17:32:45 +00:00
bluebluesoda c96343336a fix(panel): drop deleted images from the reinstall picker
collectManagedImages always force-added the configured default (incus.image)
first, so a default image deleted from Incus stayed as a permanent choice in
the reinstall dialog even though it no longer existed. Modify the list to
contain only images actually present in Incus, ordering the configured
default first only when it exists.

- Only images present in the alias list are offered; a deleted image now
  disappears from the picker.
- Incus-query failure still offers the configured default so reinstall works.
- /images now returns 'default' pointing at an actually-present image (the
  configured one if present, else the first offered), so the UI always has a
  checked entry instead of leaving every radio unselected.
- Update image tests to the new contract.
2026-08-25 15:04:58 +00:00
bluebluesoda 9dfbc30bf1 feat(panel): redesign reinstall image picker with brand logos and prominent selection
- Replace hand-drawn approximation icons with each distro's official
  logomark (Debian swirl, dev terminal, Alma, Rocky mountain+sun,
  openSUSE gecko, Arch A) on a unified rounded brand tile, white glyph.
- Convert the flat radio pills into a responsive card grid. Selecting now
  shows an accent border + ring + glow, lifts the card, tints the
  background, and reveals a round check badge (animated scale in) in the
  corner instead of only recolor the text/border.
- Widen reinstall modal to 560px; clarer intro copy and description line.
2026-08-25 12:29:58 +00:00
bluebluesoda cb3dbe19bc feat(panel): split CPU display window — admin 1h, user 5m; doc updates
- Admin overview table and CLI vps list/show now show the one-hour CPU
  average; the user panel keeps the five-minute (near-live) average.
- Relabel the admin column to 1小时CPU / 1h CPU.
- Unify the two READMEs with Chinese as the source of truth and add the
  features shipped since v1.3.5 (SSH key management, login-as, encrypted
  notes, Debian dev + Arch images).
2026-08-25 05:58:29 +00:00
bluebluesoda 1a104e3cb0 feat(panel): CPU average window 15m -> 5m in panels and CLI
- Switch the CPU average window from -15m to -5m across admin/user panels
  and the CLI list/show path (mgr.List, mgr.Show, BatchUsers, PanelResources).
- Relabel the column/card to 5分钟CPU / 5m CPU.

The dashboard CPU figure now reflects the trailing 5-minute average.
2026-08-25 05:49:26 +00:00
bluebluesoda bd55fc4a77 Update README.md 2026-08-25 03:48:26 +08:00
bluebluesoda c246249a0b Revert "fix(images): Arch build — multi-mirror fallback + no download timeout"
This reverts commit e010552683.
2026-08-24 19:28:40 +00:00
bluebluesoda e010552683 fix(images): Arch build — multi-mirror fallback + no download timeout
The minimal Arch base ships a single-default mirror list, so a slow or flaky
mirror aborted the whole pacman transaction. Write a mirrorlist with a few
reliable servers (official geo redirect + kernel.org + constant.com) so pacman
falls back automatically, and pass --disable-download-timeout so a slow-but-
alive download finishes instead of tripping the 'too slow' check.
2026-08-24 19:21:54 +00:00
bluebluesoda 2d142ae165 fix(panel): read image description from properties, not the top level
incus publish 'description=<v>' stores the value as the image's
properties.description (what incus image show prints), not a top-level
field — so the Arch build date was never read and the reinstall dialog
fell back to the static blurb. Parse properties.description instead;
verified against the live Incus API.
2026-08-24 19:03:43 +00:00
bluebluesoda e3e49b12e7 feat(panel): show Arch build date in the reinstall intro; fix Arch icon
- Arch script records the build date as 8 digits (YYYYMMDD) in the image
  description
- lx.ImageAliasesWithDesc exposes image descriptions; Images() folds the
  date into the Arch intro ('…滚动发行版,我们提供镜像打包于 <date>')
- Arch icon is now the 'A without crossbar' (Λ) shape instead of a solid
  triangle
2026-08-24 18:50:42 +00:00
bluebluesoda 5bb4a5776c fix(images): Arch build — drop openssh-client, record version, clean orphans
- openssh on Arch ships both sshd and the ssh client; openssh-client does not
  exist and broke the whole pacman transaction (tested on a real Incus host)
- pacman -Syu --needed avoids reinstalling base packages; remove orphaned
  packages after the upgrade (apt-autoremove equivalent)
- record the Archlinux<YYMM> version code via the publish key=value property
  (incus publish has no --description flag); plain rm for cache cleanup
  (pacman -Scc prompts in a non-tty exec)
- verified end-to-end: built vpsmgr/arch-sshd, launched a container and
  confirmed IPv4 + IPv6 connectivity and SSH over both stacks
2026-08-24 18:10:26 +00:00
bluebluesoda 49d34f3748 feat(images): optional Arch Linux rolling image builder
- scripts/90-arch-image.sh: builds vpsmgr/arch-sshd from images:archlinux/
  current; unlike other image scripts it always deletes and rebuilds (rolling),
  records Archlinux<YYMM> in the image description, keeps the image slim and
  deletes the base afterwards
- Register Arch Linux label + rolling-release blurb and a gray triangle icon
  in the user panel reinstall dialog
- Docs (README, architecture, development, AGENTS) and image tests updated
2026-08-24 17:48:12 +00:00
bluebluesoda 1835c5ce53 fix(panel): notes — unlock after password change, button highlight
- Keep the in-memory envelope in sync after every save so unlocking with a
  freshly changed password works without a page reload
- Save & lock now uses the plain button style; Save now is highlighted
2026-08-24 17:34:14 +00:00
bluebluesoda 0e76e5f813 feat(panel): notes — move lock to save-and-lock, add change-password
- Replace the list-header Lock button with 'Save & lock' in the editor
  toolbar: it forces a server save (verified) before locking
- Add a 'Change password' button where Lock used to be; opens a modal that
  re-encrypts the notes with a fresh key+salt and persists, reverting on
  failure
- doSave now resolves success/failure so save-and-lock can confirm first
2026-08-24 17:26:39 +00:00
bluebluesoda 3ffa594a34 Update 80-debian-dev-image.sh 2026-08-25 00:44:05 +08:00
bluebluesoda 2f2f152d33 refine(panel): notes export as Markdown — # title heading and .md extension 2026-08-24 16:00:13 +00:00
bluebluesoda f6ad826384 feat(panel): export sticky notes as a ZIP (per-note txt + raw.json)
- Add an Export button in the notes list header (next to Lock)
- Hand-written minimal ZIP writer (STORE, no deps, CSP-safe)
- Each note becomes a .txt; a versioned raw.json is included for future
  import; filename yyyy-mm-dd-hh-mm-ss-notes.zip
2026-08-24 15:49:57 +00:00
bluebluesoda a883e272c9 feat(cfg): snapshots.limit 0 now disables snapshots instead of clamping to 1
- SnapshotLimit() returns 0 when the configured limit is 0 (or negative),
  meaning users cannot create new snapshots; existing snapshots are kept
- SnapshotCreate refuses with 'snapshots are disabled' before any Incus call
- Update config comment/registry description and tests for the new semantics
2026-08-24 14:38:03 +00:00
bluebluesoda bd5acddd15 refine(panel): move reinstall snapshot warning below the confirm button 2026-08-24 13:48:43 +00:00
bluebluesoda 3630e0f4bb fix(panel): Rocky icon to green (was brownish amber) 2026-08-24 13:13:01 +00:00
bluebluesoda f402e47689 refine(panel): enlarge reinstall dialog, icons and tabs; redraw Debian as a spiral
- Widen the reinstall modal (620px) and enlarge the image tabs + icon badges
  (28px SVGs)
- Replace the Debian dot-swirl with a true spiral coil path so it reads as a
  whirl
2026-08-24 12:58:07 +00:00
bluebluesoda 3b653b9fcb feat(panel): reinstall images with per-OS descriptions and icons
- Backend: ManagedImage gains desc_zh/desc_en, populated per alias so the
  reinstall dialog shows a one-line blurb for the selected image
- Frontend: per-image inline SVG icons (Debian swirl, dev hammer on pink,
  Alma multicolor flower, Rocky mountain+sun, openSUSE gecko) and a live
  description line below the image picker
2026-08-24 12:50:17 +00:00
bluebluesoda d523566276 refine(panel): concise UI copy across the user panel 2026-08-24 12:27:09 +00:00
bluebluesoda ed648a6b12 feat(mgr): sync user and admin SSH keys via markers, revoke on deactivate
- Write user-managed key lines with a Vpsmgr-User marker and operator keys
  with a Vpsmgr-Operator marker
- applySSHKeysScript now drops every marked line then re-adds the still
  active/granted set, so unchecking or deleting a key actually removes it
  from authorized_keys; hand-added (unmarked) keys are never touched
- Update tests for the new markers and the same-key-in-both-roles cases
2026-08-24 12:27:09 +00:00
bluebluesoda aa3c718522 feat(panel): expand admin-keys disclosure by default when a key is granted
- Default the 'admin public keys' list to expanded (button shows collapse)
  whenever the user has activated at least one admin key; otherwise keep it
  collapsed. JS derives the initial state from the DOM.
2026-08-24 11:41:35 +00:00
bluebluesoda c59e76244c feat(admin/panel): audit i18n, SSH-copy ports, login-as guard
- Audit: translate newly added action labels (login, ssh keys, admin keys,
  init script, notes reset, ipv6 pool, bandwidth reset); highlight the pure
  admin actor '000' like '000+' operators
- User panel: V4/V6 port blocks are click-to-copy, copying the full
  'ssh -p <port> root@<ip>' command via a data-copy override
- Security: login-as refuses when the user panel is disabled, avoiding a
  Path="/" cookie leak; covered by a test
2026-08-24 11:25:15 +00:00
bluebluesoda a0ae53204d feat(admin): log in as a user (impersonation)
- Admin /login-as: create an impersonated user session, set the user-panel
  cookie, redirect into that user's panel regardless of password
- Session DB migration: sessions.impersonated flag to distinguish operator
  logins; user panel shows a 'logged in as' banner + return link
- Audit: impersonated-session actions are attributed '000+<user>' via an
  auditActor helper (all 12 panel call sites)
- Audit coverage: add user/admin login, init-script save, ipv6 pool add/del
- Admin UI: 'login panel' button per user row and 'log in as' in the
  post-create modal (flash now carries opaque data)
2026-08-24 09:19:58 +00:00
bluebluesoda 5dd172ddcb feat(panel): users can activate admin SSH keys on their machine
- Admin keys: remove the per-key active checkbox; every key the operator
  adds is uniformly visible to users
- User SSH-key panel: grant admin keys with a checkbox; saving persists the
  grant and syncs it into the container's authorized_keys
- Admin-injected lines carry an ASCII 'from-admin' marker so they are
  reliably identifiable
- Admin keys are fully synced: activated keys present once, unactivated or
  deleted ones removed on save; user's own and hand-added keys untouched
- Reinstall re-injects granted admin keys so admin access survives
- DB v10: admin_key_grants join table (cascade with user/admin key)
2026-08-24 08:52:33 +00:00
bluebluesoda 1943c9c646 feat(panel): show admin's public keys to users in SSH-key panel
- Add a collapsible 'expand admin keys' link in the user SSH-key modal
- Reveals the operator's stored public keys read-only (name + key content)
- Shows a red warning that activating those keys authorizes admin login
- Hidden entirely when the admin has no stored keys
2026-08-24 08:26:26 +00:00
bluebluesoda 6d9a81b1c9 feat(panel): auto-title untitled notes and lock button
Untitled notes now get a title derived from the first line of their content
(trimmed, capped at 15 chars) at save time; an existing title is never
overwritten. A Lock button next to Add flushes pending edits, drops the
local password/key cache and returns to the unlock prompt.
2026-08-24 08:09:40 +00:00