Skip to content

v0.1.6

Choose a tag to compare

@github-actions github-actions released this 18 Nov 03:23
· 2 commits to main since this release
b66ed29

Added

  • Split-7z game archives (VRP / Cyberdeck compatibility, Issue #1): Each exposed game is
    now packed into a split, AES-256-encrypted 7z archive ({releaseName}.7z.001, .7z.002, …)
    under {data_dir}/games/{hash}/, encrypted with the existing archive_password. The public
    listing at GET /{hash}/ advertises the parts directly when the archive exists, and
    GET /{hash}/{releaseName}.7z.NNN serves each volume with HTTP Range support. The archive's
    internal layout ({releaseName}/{apk} + {releaseName}/{packageName}/{obb}) matches what
    VR-CyberDeck and the VRHub Android client extract. Archives are generated in the background
    at startup and after each import, so packing a large library never blocks startup or requests;
    until a game's archive exists the server falls back to serving the raw APK/OBB (both clients
    accept either format). A new [archive] split_size config key (default 2g) controls the
    per-volume size. No database migration: the on-disk parts plus a small .archive.json marker
    (password hash + version code) are the source of truth, so a password change or game update
    regenerates the archive automatically.
  • TLS/HTTPS support (#16): Operator-provided certificates are now supported via a new
    [server] config keys tls_cert and tls_key. When both are set the server binds with
    ListenAndServeTLS; certificate/key files are validated at startup. Full setup guide in
    docs/TLS-SETUP.md.

Fixed

  • gofmt-clean internal/db/db.go (#2): Formatting-only fix to satisfy the CI
    gofmt check on the DB layer.

  • Incorrect MB/GB divisors in formatBytes (#3): The admin dashboard's byte-size
    formatter used the wrong divisor between the MB and GB tiers, understating large sizes.

  • GetStatsForHash "not found" handling (#4): Switched to errors.Is(err, sql.ErrNoRows)
    instead of a direct equality check, so wrapped errors are matched correctly.

  • Monitor Subscription.Events channel leak (#5): Unsubscribe now actually closes the
    channel; previously it was a no-op, leaking a channel per SSE client disconnect.

  • serveFileDownload status-line ordering (#6): The file is now opened before the
    response status line is committed, so a missing/unreadable file returns a proper error
    status instead of a partially-written 200.

  • Scripts API CSRF false-positive (#7): The session CSRF check no longer runs on
    /admin/api/scripts/* routes, which authenticate via X-API-Key and never carry a
    session cookie in the first place.

  • Stale .updating removal retried on Windows: The self-update applicator now retries
    deleting a leftover .updating file before failing, working around Windows' delayed
    file-handle release after a process exit.

  • Self-update version never converged (#12): CurrentVersion was hardcoded and never set
    from build info, so an already-updated server kept reporting "update available" forever (and
    looped indefinitely with auto_apply + auto_restart). The release workflow now injects the
    real version via -ldflags -X main.version=... and the server calls update.SetCurrentVersion()
    at startup.

  • Setup wizard ignored the -port flag (#12): A server launched with -port 39999 ran the
    whole wizard on 39999 but persisted the hardcoded default 39457 to config.toml, silently
    switching ports on the next restart and breaking /config.json's baseUri for VRHub clients.
    The resolved listen port is now persisted.

  • API key missing after the live setup-to-normal transition (#12): A server that completed
    the wizard without a restart had no API key, and the /admin/api/scripts/* middleware baked
    in a permanent 503 at router-construction time that a later-generated key could never clear.
    The key is now generated from the wizard's launch handler too, and the config is resolved
    per-request.

  • Per-session CSRF secret (#13, #17): The session CSRF secret is no longer hardcoded. A
    random secret is generated (or taken from config) at startup and CSRF tokens are derived per
    session with HMAC-SHA256 and constant-time comparison. All state-changing admin endpoints
    (update apply/reset/restart, game revalidate, game delete) now enforce CSRF validation;
    read-only GET endpoints stay unprotected by design.

  • Owner-only data directory (#14): The config/data directory is created with 0700
    permissions so the archive password, API key hash and CSRF secret stored inside are no longer
    readable by other local accounts.

  • Request body size limits (#15): All setup wizard handlers cap JSON request bodies at
    16 KiB via http.MaxBytesReader, preventing memory exhaustion from oversized payloads.

  • Live rebind with TLS on the same address: changing tls_cert/tls_key without
    changing server.host/server.port used to fail with rebind_status: "failed"
    (Windows: "Only one usage of each socket address…") because the rebinder bound the
    new listener before shutting the old one down — TLS only took effect after a full
    restart. A TLS-only change on the same address now validates the key pair first (an
    invalid certificate never tears down a running server), gracefully shuts the old
    listener down, then binds the new one (brief downtime for the TLS toggle), restoring
    the old listener if the bind fails. Host/port changes keep the no-downtime
    bind-before-shutdown path (Story 6-3 R13-P2). The initial boot also pre-binds a
    tracked listener so server.Shutdown() closes the port even in TLS mode.

  • Relative apk_path resolved against the wrong base (admin revalidate): the admin
    revalidate handler statted a relative games.apk_path against the process working directory
    instead of the data directory, so games served correctly by the public layer were wrongly
    marked corrupted and unexposed. Relative paths now resolve against DataDir, matching the
    public serving path.

  • Corruption status reported a stale verdict for a missing file: GET corruption status
    returned the cached corrupted:false when no game file exists on disk, giving no indication
    that the library entry is broken. It now reports found:false with a reason.

  • Same-address TLS rebind left the rebinder inconsistent when both binds failed: the
    rollback path did not restore the rebinder's own state (server slot, address, TLS cert/key),
    and RebindWithTLS dereferenced a nil server slot. The previous state is now restored, and a
    server with no tracked listener no longer panics.

  • Update banner offered an update to the version already running: the package defaults for
    the current version still advertised 0.1.4 while 0.1.6 was the shipped release, so an
    up-to-date server kept offering to "update" (and, with auto_apply, re-applying the same
    release). The defaults now match the shipped release, and the outbound User-Agent is derived
    from the same value instead of a second hardcoded string.

  • Documentation described versions the code does not have: docs/API.md showed an outdated
    server version in its example response, and docs/TLS-SETUP.md claimed TLS was available
    "since 0.1.7", a release that does not exist.