mirror of
https://github.com/LisherSong/ps5-web-file-manager.git
synced 2026-10-06 07:00:28 +02:00
Homebrew HTTP file manager payload for jailbroken PS5 consoles (x86_64-sie-ps5,
title id FMGR88888). Browse, edit, upload, download and extract ZIPs through
any browser on the LAN; single self-contained ELF, no external services.
Highlights (v1.7):
- ZIP large-file profile (large=1): 2 TiB total / 1 TiB per entry / 1000:1
ratio. Frontend prompts for confirmation whenever archive > 60 GiB on disk.
- Default ZIP profile stays safe: 512 GiB / 64 GiB / 200:1.
- 69 host-side C tests (tests/run-tests.sh) covering traversal, ZIP64,
encryption rejection, conflict policies and the large-file profile.
- Three-phase extraction engine (scan -> extract -> publish -> cleanup) with
atomic staging + rename, located in src/zip_extract.{c,h}.
Project layout:
src/ C payload sources
assets/ HTML / CSS / JS / icons / param.json
tests/ POSIX/host test suite + fixtures
third_party/ vendored zlib + minizip-ng (zlib license)
docs/screenshots/ README screenshot images
LICENSE GPLv3+
Build:
make # cross-compile with PS5_PAYLOAD_SDK
make linux # Linux host binary for UI dev
58 lines
1.5 KiB
Bash
58 lines
1.5 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
LIB_VER="${LIBMICROHTTPD_VERSION:-1.0.1}"
|
|
LIB_URL="${LIBMICROHTTPD_URL:-https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${LIB_VER}.tar.gz}"
|
|
LIB_TARBALL="${LIBMICROHTTPD_TARBALL:-}"
|
|
|
|
if [[ -z "${PS5_PAYLOAD_SDK:-}" ]]; then
|
|
echo "error: PS5_PAYLOAD_SDK is not set" >&2
|
|
exit 1
|
|
fi
|
|
|
|
source "${PS5_PAYLOAD_SDK}/toolchain/prospero.sh"
|
|
|
|
if "${PS5_PAYLOAD_SDK}/bin/prospero-pkg-config" --exists libmicrohttpd; then
|
|
echo "libmicrohttpd is already available in PS5_PAYLOAD_SDK"
|
|
exit 0
|
|
fi
|
|
|
|
tmpdir="$(mktemp -d)"
|
|
trap 'rm -rf -- "${tmpdir}"' EXIT
|
|
|
|
archive="${tmpdir}/libmicrohttpd-${LIB_VER}.tar.gz"
|
|
if [[ -n "${LIB_TARBALL}" ]]; then
|
|
cp "${LIB_TARBALL}" "${archive}"
|
|
else
|
|
if command -v wget >/dev/null 2>&1; then
|
|
wget -O "${archive}" "${LIB_URL}"
|
|
elif command -v curl >/dev/null 2>&1; then
|
|
curl -L -o "${archive}" "${LIB_URL}"
|
|
else
|
|
echo "error: install wget or curl, or set LIBMICROHTTPD_TARBALL" >&2
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
tar xf "${archive}" -C "${tmpdir}"
|
|
cd "${tmpdir}/libmicrohttpd-${LIB_VER}"
|
|
|
|
export CFLAGS="${CFLAGS:-} -O1"
|
|
./configure --prefix="${PREFIX}" \
|
|
--host=x86_64-pc-freebsd \
|
|
--enable-static \
|
|
--disable-shared \
|
|
--disable-doc \
|
|
--disable-curl \
|
|
--disable-examples
|
|
|
|
"${MAKE:-make}"
|
|
"${MAKE:-make}" install
|
|
|
|
if [[ -n "${PS5_CROSS_FIX_ROOT:-}" ]]; then
|
|
"${PS5_CROSS_FIX_ROOT}" "${DESTDIR}/${PREFIX}"
|
|
fi
|
|
|
|
"${PS5_PAYLOAD_SDK}/bin/prospero-pkg-config" --exists libmicrohttpd
|
|
echo "libmicrohttpd installed for ps5-payload-sdk"
|