Repository navigation
v0.1.6
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 existingarchive_password. The public
listing atGET /{hash}/advertises the parts directly when the archive exists, and
GET /{hash}/{releaseName}.7z.NNNserves 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_sizeconfig key (default2g) controls the
per-volume size. No database migration: the on-disk parts plus a small.archive.jsonmarker
(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 keystls_certandtls_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-cleaninternal/db/db.go(#2): Formatting-only fix to satisfy the CI
gofmtcheck 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 toerrors.Is(err, sql.ErrNoRows)
instead of a direct equality check, so wrapped errors are matched correctly. -
Monitor
Subscription.Eventschannel leak (#5):Unsubscribenow actually closes the
channel; previously it was a no-op, leaking a channel per SSE client disconnect. -
serveFileDownloadstatus-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-written200. -
Scripts API CSRF false-positive (#7): The session CSRF check no longer runs on
/admin/api/scripts/*routes, which authenticate viaX-API-Keyand never carry a
session cookie in the first place. -
Stale
.updatingremoval retried on Windows: The self-update applicator now retries
deleting a leftover.updatingfile before failing, working around Windows' delayed
file-handle release after a process exit. -
Self-update version never converged (#12):
CurrentVersionwas hardcoded and never set
from build info, so an already-updated server kept reporting "update available" forever (and
looped indefinitely withauto_apply+auto_restart). The release workflow now injects the
real version via-ldflags -X main.version=...and the server callsupdate.SetCurrentVersion()
at startup. -
Setup wizard ignored the
-portflag (#12): A server launched with-port 39999ran the
whole wizard on 39999 but persisted the hardcoded default39457toconfig.toml, silently
switching ports on the next restart and breaking/config.json'sbaseUrifor 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 viahttp.MaxBytesReader, preventing memory exhaustion from oversized payloads. -
Live rebind with TLS on the same address: changing
tls_cert/tls_keywithout
changingserver.host/server.portused to fail withrebind_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 soserver.Shutdown()closes the port even in TLS mode. -
Relative
apk_pathresolved against the wrong base (admin revalidate): the admin
revalidate handler statted a relativegames.apk_pathagainst 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 againstDataDir, matching the
public serving path. -
Corruption status reported a stale verdict for a missing file:
GETcorruption status
returned the cachedcorrupted:falsewhen no game file exists on disk, giving no indication
that the library entry is broken. It now reportsfound:falsewith 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),
andRebindWithTLSdereferenced 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, withauto_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.mdshowed an outdated
server version in its example response, anddocs/TLS-SETUP.mdclaimed TLS was available
"since 0.1.7", a release that does not exist.