742 Commits

Author SHA1 Message Date
dependabot[bot]
fdc8303ea8 build(deps): Bump the npm_and_yarn group across 1 directory with 3 updates (#640)
Bumps the npm_and_yarn group with 2 updates in the / directory: [next](https://github.com/vercel/next.js) and [@hono/node-server](https://github.com/honojs/node-server).


Updates `next` from 16.2.10 to 16.2.11
- [Release notes](https://github.com/vercel/next.js/releases)
- [Commits](https://github.com/vercel/next.js/compare/v16.2.10...v16.2.11)

Removes `@hono/node-server`

Updates `fast-uri` from 3.1.2 to 3.1.4
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.2...v3.1.4)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 16.2.11
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: "@hono/node-server"
  dependency-version:
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: fast-uri
  dependency-version: 3.1.4
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-25 21:52:40 +02:00
dependabot[bot]
180c439b35 build(deps): Bump hono in the npm_and_yarn group across 1 directory (#639)
Bumps the npm_and_yarn group with 1 update in the / directory: [hono](https://github.com/honojs/hono).


Updates `hono` from 4.12.25 to 4.12.31
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.12.25...v4.12.31)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.12.31
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-25 21:47:00 +02:00
MickLesk
a3e5fbc8d8 Fix error handler filename in build script
Updates `build_container()` to source `error_handler.func` instead of the incorrectly named `error-handler.func`, ensuring the combined stdin-sourced script includes the intended error handling file.
2026-07-20 20:35:45 +02:00
MickLesk
9f2dc5e79b hotfix: remove stray duplicate curl call in build.func breaking LXC creation
An unconditional `export FUNCTIONS_FILE_PATH="$(curl -fsSL "$_func_url")"`
line ran after the if/else that decides how to populate
FUNCTIONS_FILE_PATH. $_func_url is only ever assigned inside the else
branch (remote-fetch path), so whenever the local install.func file
existed (the normal case), this stray line ran curl with an empty URL —
"curl: option : blank argument where content is expected" — aborting
every fresh container creation (e.g. Adguard LXC) with exit code 2.

Bump to 1.1.7.1 (VERSION + package.json) for this hotfix.
v1.1.7.1
2026-07-20 20:01:39 +02:00
MickLesk
35536164fb chore: bump version to 1.1.7 (VERSION + package.json) v1.1.7 2026-07-20 16:21:01 +02:00
CanbiZ (MickLesk)
546c928c12 Several bugfixes, security hardening, and UX improvements (#632)
* Fix fallback path for scripts without install_methods

Generalize the fallback logic in `isScriptDownloaded` and `getDownloadedFiles` to use `deriveScriptPath` instead of hard-coding the `ct/` directory. This fixes detection for PocketBase-style 'pve'/'addon' tool scripts that have no `install_methods` but are still downloaded via `loadScript`'s own fallback path.

* Run batch container updates in background, auto-advance on completion

Batch "Update All" previously required the user to manually close each
per-container terminal before the next one would start, and each window
opened focused/visible. Now batch-update sessions open minimized and
auto-close (advancing the queue) once the script itself reports
completion via the WS "end" message, instead of waiting for a manual
close.

* Hint where to enable server color coding when disabled

Server Color Coding is a hidden-by-default setting (Settings > General),
so the color field silently disappeared from the server form with no
indication it existed. Show a short pointer to where it can be enabled.

* Fix strict-null-check build error in fallback path detection

* Harden WebSocket/SSH execution security

- Validate shell-interpolated params (containerId, storage, hostnames, containerType, cloneCount) on WebSocket 'start' messages
- Add path traversal guard: script paths must resolve inside the scripts directory
- Filter env-var keys to valid shell identifiers before interpolation in all execution paths
- Redact SSH credentials (password, ssh_key, ssh_key_passphrase) from all API responses in servers and installedScripts routers
- Suppress secret values from SSH execution logs; log only key names
- Update installation record to 'failed' on manual stop; guard optional chaining on process/ws access

* Persist update results for installed scripts

Propagate `installedScriptId` from the UI terminal session through WebSocket start messages so update runs can be tied to a specific InstalledScript record. Update execution paths (local and SSH) now buffer output and persist final status/output_log on completion.

The Installed Scripts tab now shows a batch-update completion summary with succeeded/failed containers after refetching fresh statuses, and shell session/types were extended accordingly. Also tightened `redactServer` typing to accept server-like objects with optional secret fields while still stripping sensitive values.

* Remove overbroad regex fallbacks for container ID / web UI IP detection

parseContainerId's generic 3-4 digit fallback and parseWebUIUrl's bare-IP
fallback could match any unrelated number/dotted-quad in script output
(ports, percentages, netmasks) and silently overwrite the correct
container_id/web_ui_ip with a wrong one. Removed both fallbacks — every
remaining pattern requires enough context (a label, protocol, or port)
to be a reasonably reliable match.

* Add toasts and dynamic terminal sizing

Introduce a new `ToastProvider`/`useToast` context and wire it into the app so server CRUD actions in `SettingsModal` show success/error toast feedback, including API error messages when available. Also pass terminal `cols`/`rows` through script and SSH execution paths with larger fallback defaults to improve ncurses/whiptail rendering versus the old fixed 80x24/120x30 sizes.

* Thread real terminal size through every execution path

cols/rows from the WebSocket start message were parsed but never passed
to any of the start*Execution methods — every PTY (local script, SSH
script, in-container exec, update, shell, backup, clone) was spawned
with a hardcoded small size (80x24 or 120x30) regardless of the
browser's actual terminal dimensions. Whiptail/dialog-based scripts
center their UI based on that (wrong) reported size, so the dialog box
ends up positioned arbitrarily instead of centered in the visibly much
larger terminal. Now the real cols/rows are threaded end-to-end.

* Improve modal stacking and dialog readability

Add a shared `NEWT_COLORS` export to server-side script/update execution so whiptail/dialog UIs use a higher-contrast theme, including interactive LXC shell sessions. Update Backups, Generator, DiffViewer, and Installed Scripts modals to register with `ModalStackProvider` and use dynamic z-index values (and portal usage in DiffViewer), fixing overlay ordering and close behavior consistency across stacked dialogs.
2026-07-20 16:18:45 +02:00
MickLesk
ed2acb8e0e bump typescript dependency v1.1.6 2026-07-20 13:54:12 +02:00
MickLesk
e44bfbd285 chore: bump version to 1.1.6 (VERSION + package.json) 2026-07-20 13:38:11 +02:00
MickLesk
d4584b6aa2 Add top-level postcss dependency
Declare `postcss` as a direct dependency in `package.json` (v8.5.20). This makes PostCSS availability explicit for the project and results in lockfile deduplication by removing Next.js’s nested PostCSS entry.
2026-07-20 13:36:58 +02:00
MickLesk
b130fb21e2 Handle per-method script download failures
Wrap each install-method file download in its own try/catch so a missing or failing variant no longer aborts the entire script load. The service now records method-level errors, continues downloading remaining methods, and includes a combined error message in the result when no files were downloaded.
2026-07-20 13:32:14 +02:00
MickLesk
f381e79d77 Mark installs failed on execution cleanup
When cleaning up active executions tied to a disconnected websocket, the handler now safely checks for a process before sending SIGTERM and proactively updates any related installation record to `failed` with buffered output. This prevents records from being left stuck in `in_progress` after cleanup removes the execution before exit handling runs.
2026-07-20 13:27:39 +02:00
MickLesk
1164646466 Preserve server creds on edit and track container
Improve install/update flow and server editing behavior. Script execution now records a known container ID when creating installation records, so entries are linked from the start. Server edit validation was updated in both the form and PUT API route to allow blank password/SSH key fields when an existing stored secret can be reused, while still enforcing required auth data for new servers or missing stored credentials. The batch update confirmation modal now requires explicit text confirmation ("UPDATE ALL") before running.
2026-07-20 13:26:28 +02:00
MickLesk
6db54f53f8 Update package-lock.json 2026-07-20 13:08:07 +02:00
MickLesk
39b3bc8159 update package.lock 2026-07-20 13:03:58 +02:00
MickLesk
ec9e419744 bump dev dependencies 2026-07-20 13:02:12 +02:00
MickLesk
41d12796e8 bump dependencies 2026-07-20 13:00:44 +02:00
MickLesk
30c7adbe96 Expand ARM64 and proxy support in core | Refresh Core
Adds broad ARM64-aware behavior across build/install flows, including architecture validation, ARM64 template sourcing, architecture-specific package handling, and ARM64 notices. Introduces end-to-end HTTP proxy support (vars, validation, interactive prompts, container bootstrap propagation, and update-path sourcing), plus SDN vnet selection/validation and storage health safeguards.

It also hardens runtime/update behavior with script status guarding, improves GPU device mapping (including /dev/kfd), and significantly refactors tools helpers for safer curl usage, shared archive deploy logic, better temp-file cleanup, prefix-aware GitHub/GitLab release selection, and stricter package/repo error handling. The error handler module is renamed to use an underscore path and all references are updated.
2026-07-20 12:59:05 +02:00
github-actions[bot]
c53c562cee chore: bump version to 1.1.5 (VERSION + package.json) (#629)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-28 13:01:59 +00:00
Sam Heinz
2fa772f698 add arch_resolve func 2026-06-28 22:59:43 +10:00
Michel Roegl-Brunner
7bbfa15a77 Update feature_request.yml 2026-06-16 08:56:13 +02:00
Michel Roegl-Brunner
6a0dd9cea5 Update bug_report.yml 2026-06-16 08:55:59 +02:00
Michel Roegl-Brunner
6cbffaa0e9 Update README.md 2026-06-16 08:54:50 +02:00
MickLesk
c40ba8fcb4 fix(auth): resolve login regression by reading .env auth state robustly v1.1.4 2026-06-15 18:01:29 +02:00
github-actions[bot]
3768a6fe83 chore: bump version to 1.1.4 (VERSION + package.json) (#618)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-15 12:27:51 +00:00
Macéo JALBERT
772daaf5f7 Fix/password generation#615 (#617)
* feat: add JWT expiry validation and refactor magic numbers

- Decode JWT in WebSocket auth to reject expired tokens and log auth failures.
- Introduce constants `OUTPUT_BUFFER_MAX_LENGTH`, `BACKUP_UPDATE_DELAY_MS`, and `JWT_EXP_MS_FACTOR`.
- Replace hardcoded buffer length and delay values with the new constants.
- Coerce `AUTH_ENABLED` and `AUTH_SETUP_COMPLETED` to boolean and add `AUTH_SESSION_DURATION_DAYS` env.

* feat(auth): sync process.env and mark setup completed after credentials update

Add a `syncProcessEnvFromFile()` function that reads the .env file and updates
process.env and the cached JWT secret, ensuring that in-memory state matches
the persisted environment without requiring a server restart.

Call this function after writing credentials or toggling authentication
settings to keep the running server in sync. Also set the setup completed flag
when credentials are updated, and clear it when disabling auth to force the
fresh setup flow on re-enable.

---------

Co-authored-by: Vivelis <¨maceo.jalbert@gmail.com¨>
2026-06-15 14:26:46 +02:00
MickLesk
706e7d1c1c chore: align updater version to 1.1.3 v1.1.3 2026-06-13 18:37:55 +02:00
MickLesk
d2954f126c feat: enhance server resolution logic for SSH execution with redacted payloads 2026-06-13 18:36:06 +02:00
MickLesk
44530afe24 feat: enhance script downloading fallback logic and add support for additional script types 2026-06-13 18:34:23 +02:00
MickLesk
741ccb38d8 Merge branch 'main' of https://github.com/community-scripts/ProxmoxVE-Local 2026-06-13 18:27:32 +02:00
MickLesk
1498f36b48 update package-lock 2026-06-13 18:27:30 +02:00
github-actions[bot]
f0e6629725 chore: bump version to 1.1.3 (VERSION + package.json) (#614)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-13 16:26:47 +00:00
Macéo JALBERT
62bcfe0012 feat: add JWT expiry validation and refactor magic numbers (#612)
* feat: add JWT expiry validation and refactor magic numbers

- Decode JWT in WebSocket auth to reject expired tokens and log auth failures.
- Introduce constants `OUTPUT_BUFFER_MAX_LENGTH`, `BACKUP_UPDATE_DELAY_MS`, and `JWT_EXP_MS_FACTOR`.
- Replace hardcoded buffer length and delay values with the new constants.
- Coerce `AUTH_ENABLED` and `AUTH_SETUP_COMPLETED` to boolean and add `AUTH_SESSION_DURATION_DAYS` env.

* refactor: remove unused and  confusing WEBSOCKET_PORT env variable

---------

Co-authored-by: Vivelis <¨maceo.jalbert@gmail.com¨>
2026-06-13 18:24:26 +02:00
MickLesk
2179660167 Bump Various NPM Packages to new version 2026-06-13 18:22:41 +02:00
github-actions[bot]
0743010bee chore: bump version to 1.1.2 (VERSION + package.json) (#603)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-08 19:00:38 +00:00
CanbiZ (MickLesk)
001ff7b999 v1.1.2 Bump (Security, Alpine Fixes (#602)
* fix(security): protect servers api and redact secrets

* feat: add authentication checks to various API routes

- Implemented `requireApiAuth` in multiple settings routes to enforce authentication.
- Added checks for setup completion in the authentication setup route.
- Enhanced error handling and response messages for better clarity.
- Ensured that sensitive information is only exposed to authenticated users.

* fix: update auth module import from .ts to .js

* fix: enhance error handling in auto-sync and normalize alpine CT slug

* fix: remove unnecessary whitespace in script handling functions

---------

Co-authored-by: ProxmoxVE Developer <dev@localhost>
2026-06-08 20:59:39 +02:00
MickLesk
9c912bf2bc feat: increase default FloatingShell size to 1400x860 v1.1.1 2026-05-29 13:36:33 +02:00
MickLesk
3b8d6e64b2 feat: open FloatingShell maximized by default
Whiptail dialog positioning depends on COLUMNS/LINES matching the actual
rendered terminal size. When the window opens at a fixed 1000x640px and
the user resizes, the PTY needs a resize signal (currently broken on
old deployments). Opening maximized avoids the need to resize entirely:
the PTY spawns at full-screen dimensions, whiptail is correctly centered,
and resize is not needed for normal use.

User can still restore/drag to a smaller window after the script finishes.
2026-05-29 13:35:27 +02:00
MickLesk
f90c01609f fix: set executionIdRef synchronously in ws.onopen
The ref was only updated via a useEffect, which runs asynchronously after
the state update. If ResizeObserver fires in the gap between setExecutionId()
and the effect, the resize message carries the stale initial executionId
instead of the one registered with the server -> resizeExecution silently
fails and PTY never gets the SIGWINCH.

Setting executionIdRef.current directly in ws.onopen ensures the ref is
correct before any resize messages can be sent.
2026-05-29 13:00:51 +02:00
MickLesk
f58996b577 fix: install.func guard + move clear to client-side before resize
install.func: use _CORE_FUNC_LOADED guard instead of BASH_SOURCE[0]
check. When sourced via herestring (pct exec), BASH_SOURCE[0] is empty
string which slipped past the /dev/stdin check, causing /dev/core.func
not found errors. _CORE_FUNC_LOADED is always set when core.func is
already loaded as part of the combined FUNCTIONS_FILE_PATH.

handler.ts + Terminal.tsx: move the xterm clear (ESC[2J ESC[H) from
server-side to client-side, sent immediately before the resize WS
message. Server-side clear had a race: whiptail SIGWINCH redraw
(PTY -> SSH -> WS) could arrive before or after our server clear,
causing it to wipe the correctly redrawn dialog. Client-side clear
is synchronous and always precedes the server's SIGWINCH redraw.
2026-05-29 12:49:16 +02:00
MickLesk
e8bc6a9093 fix: simplify sourcing of core and error handler functions 2026-05-29 12:39:27 +02:00
MickLesk
3541b2d137 fix: CM unbound variable + include executionId in resize message
install.func: move load_functions/catch_errors outside the stdin guard.
The guard only prevents sourcing files from /dev path when running via
stdin, but load_functions (which calls icons() setting CM) and
catch_errors must always run. Previously they were inside the guard,
so CM was never set when running via pct exec -> unbound variable crash.

Terminal.tsx: add executionIdRef and include executionId in resize WS
messages. Without it the handler can't find the active PTY execution,
so pty.resize() and the screen-clear after resize were both silent no-ops.
2026-05-29 12:37:37 +02:00
MickLesk
7cc83c0d23 fix: clear xterm screen after PTY resize to eliminate whiptail ghost artifacts
After pty.resize() sends SIGWINCH to the remote process, ncurses redraws
the dialog at the new position but does NOT erase the old character cells.
By sending ESC[2J ESC[H to the client immediately after resize, xterm is
cleared before whiptail's SIGWINCH redraw arrives (~10-50ms SSH roundtrip),
so the new dialog renders on a clean screen with no ghost artifacts.
2026-05-29 12:30:25 +02:00
MickLesk
82d6e8aee6 fix: debounce resize WS messages and delay start until terminal is fitted
- ResizeObserver now debounces 150ms before sending 'resize' to server,
  preventing Unknown action spam during window drag
- Start message delayed 300ms after WS open so fitAddon.fit() has run
  and actual cols/rows are read, fixing whiptail dialog misalignment
2026-05-29 12:20:42 +02:00
MickLesk
b2c32cdbe3 chore: bump version to 1.1.1 2026-05-29 12:04:39 +02:00
MickLesk
3772f0fc0f fix: console window resize, whiptail clipping and fullscreen height
- FloatingShell: larger default (1000x640), drag-resize handles on all
  8 edges/corners, minimum size enforcement (480x340)
- Terminal: ResizeObserver re-fits xterm whenever container changes size,
  covering both drag-resize and maximize toggle; sends resize WS message
  so PTY tracks the new dimensions
- ssh-execution-service: accept cols/rows params (default 220x50) and
  use them in ptySpawn + COLUMNS/LINES env instead of hardcoded 120x30
- websocket handler: extract cols/rows from start message, pass to
  executeScript; add 'resize' action that calls pty.resize()
2026-05-29 11:24:56 +02:00
MickLesk
729d73f782 refactor: clean up whitespace and formatting in SSHExecutionService methods 2026-05-29 11:23:17 +02:00
MickLesk
8ffed66efb feat: implement window resizing functionality in FloatingShell and add resize handling in Terminal 2026-05-29 11:23:08 +02:00
dependabot[bot]
789bb55d13 build(deps): Bump lucide-react from 1.16.0 to 1.17.0 (#595)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/1.17.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-version: 1.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-29 11:15:16 +02:00
dependabot[bot]
1ae7bc22f0 build(deps): Bump the npm_and_yarn group across 1 directory with 2 updates (#594)
Bumps the npm_and_yarn group with 2 updates in the / directory: [fast-uri](https://github.com/fastify/fast-uri) and [hono](https://github.com/honojs/hono).


Updates `fast-uri` from 3.1.0 to 3.1.2
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.0...v3.1.2)

Updates `hono` from 4.12.15 to 4.12.23
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.12.15...v4.12.23)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: hono
  dependency-version: 4.12.23
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-29 11:14:52 +02:00
MickLesk
8c6d682d7b fix: move source guards inside if block in install.func
Fixes syntax error 'unexpected token fi' caused by empty if...fi block.
Source calls for core.func/error-handler.func were outside the guard,
causing them to run unconditionally (including via /dev/stdin).
2026-05-29 11:14:27 +02:00