10 Commits
Author SHA1 Message Date
seregonwar a9d4e1e666 build(ps4): PacBrew portlibs for the URL downloader, PIE payloads, CI wiring
tools/fetch_pacbrew_ps4.sh unpacks the pinned PacBrew portlibs (libcurl,
mbedTLS, zlib) with a Mozilla CA bundle; the Makefile detects that prefix and
enables ENABLE_LIBCURL for PS4, bridging the three libc symbols the OpenOrbis
build expects.  Console payloads now always link as PIE (GoldHEN's payloader
rejects ET_EXEC), which is what made the plain `make deploy` flow work, and
the release workflow installs the same portlibs for PS4 zhttp artifacts.
2026-09-30 17:51:29 +02:00
seregonwar 7121e13861 feat(games): catalog, launch, install and app.db repair
List installed titles with icons, start them through LncUtil (with the
no-logged-in-user guard), install and uninstall packages, and repair missing
home screen entries through the shell's app.db.  PS5 package installs are
driven by an embedded helper delivered to elfldr on loopback.
2026-09-30 17:50:57 +02:00
seregonwar b8f15aed5a feat(transfer): unified download manager with curl, NFS and torrent backends
One manager owns remote downloads: libcurl for HTTP/HTTPS/FTP (with ranged
parallel fetches), libnfs for nfs:// URLs and an optional libtorrent engine
for magnet links.  Jobs survive payload re-injections, support pause, cancel
and retry, and report per-job progress through the HTTP API.
2026-09-30 17:50:45 +02:00
Seregon 2db0f1014f web: redesign the browser interface
Replace the embedded UI with a file manager: sidebar, details table, keyboard shortcuts, uploads, copy/move and extraction. Games, System, Transfers and Settings use the same components. The previous UI is archived in web/legacy/ and left out of the embedded resources.

The restyle is flat: donation banner, credits with the maintainer photo, and no gradients or card shadows. JavaScript stays ES5.
2026-09-29 12:53:34 +02:00
seregonwar 5c9ff1dcae refactor: organize source tree by subsystem 2026-09-09 13:27:56 +02:00
seregonwar 1ac381b85d feat: replace custom download stack with curl and libnfs 2026-09-09 12:30:02 +02:00
seregonwar b98c8797e9 API fix 2026-06-11 19:27:36 +02:00
Seregon 5e3b38902c Add EPSV/OPTS/SITE/CLNT, MLSD, HTTP stats
Adds several FTP protocol improvements and a new HTTP stats API.

FTP:
- Added EPSV, OPTS, SITE and CLNT command handlers and registered them in the command table.
- Implemented MLSD (machine-readable directory list) and redirected MLST to STAT.
- Changed USER/PASS to accept immediate login for better compatibility with Android clients.
- Relaxed PORT IP validation and added debug logging for PORT targets.
- Open data connections before sending 150 and add short pacing delay to avoid merged 150+226 replies (LIST/NLST/MLSD).
- Implemented EPSV passive socket setup and OPTS handling (UTF8/MLST) and SITE CHMOD no-op.
- Implemented atomic STOR uploads using a temp file and rename on success; cleanup on failure.
- Improved active-mode connect behavior with a short send timeout and logging; simplified data close path to match upstream behavior.
- Accept bare LF line endings from some clients and make command lookup case-insensitive.
- Enabled TCP_NODELAY on control socket and turned on FTP command logging; bumped RELEASE_VERSION to 1.2.3.

HTTP / Server infrastructure:
- Extended http_response to support in-memory streaming, segment splicing, and added APIs (set_body_ref, set_body_splice).
- Modified static serving to use splicing for injected HTML and fall back to body ref for binary assets (PNG); added image/png content-type for .png.
- Added a new /api/stats endpoint providing JSON with disk usage, items in directory, boot/uptime, and CPU temperature where available, plus numerous helper functions for gathering and formatting stats.

Build / repo:
- Updated .gitignore, added web/zftpd-logo.png and bumped embedded web resources (large generated resource changes not detailed here).

Overall these changes improve client compatibility (especially mobile/Android and GoldHEN clients), make uploads atomic, add diagnostics via the HTTP API, and enhance HTTP response streaming.
2026-02-25 23:49:34 +01:00
Seregon d09bde8174 Add pal alloc/scratch, Makefile and safety fixes
Introduce a platform allocator and scratchpad: add pal_alloc.{h,c}, pal_alloc_override.h, and pal_scratch.{h,c} (APIs and a default arena). Integrate them: add sources to the Makefile, change artifact naming and add all-platform build targets, and wire pal_scratch into main for sysctl buffer usage. Improve robustness and safety: enable FTP_LIST_SAFE_MODE in ftp_config.h, add stat-skipping and fallback behavior in directory listings, strengthen file-type checks in RETR, and harden STOR/APPE data-paths (use pool buffers, proper error handling, 64-bit counters, and logging). Fix concurrency/atomic logic in ftp_buffer_pool (use compare_exchange_strong with retry) and update ftp_session to refresh last_activity on I/O. Minor updates: mark fallback buffer as _Thread_local in pal_fileio, update docs to describe the memory strategy, bump release to 1.2.1, add tests and QA scripts, and add license headers and small metadata changes (event_loop author).
2026-02-17 20:02:15 +01:00
Seregon f48fa11a40 Add zhttpd HTTP server and kqueue loop
Introduce an embedded Web File Explorer (zhttpd) and unified event loop implementation. Adds HTTP server headers and sources (http_api, http_parser, http_response, http_server, http_csrf, http_config), kqueue-based event loop (event_loop + event_loop_kqueue), embedded resource tooling and web UI (index.html, app.js, style.css, tools/generate_resources.py), API docs (docs/API.md), and tests (tests/test_http_query.c). Update Makefile to add ENABLE_ZHTTPD toggle (enabled by default on PS4/PS5), visibility flag for console targets, and test target for the new HTTP query test. Minor cleanup to include/ftp_config.h formatting and add ftpd.log to .gitignore.
2026-02-16 17:27:33 +01:00