Repository navigation
Releases
v0.1.7
Fixed
- Self-update checksum verification compared the downloaded archive against the wrong hash:
checksums.txtpublished by the release workflow lists one entry per platform (darwin, linux and
windows, amd64 and arm64), while a client downloads exactly one of those archives. The verifier kept
the first line of that file as the expected value, so a windows-amd64 archive was compared against the
darwin-amd64 hash and every verified update failed closed on every platform except the one listed
first. The entry whose name carries the client's own OS and architecture is now selected, a sidecar
naming the downloaded file directly is honoured, and single-entry or bare-hex sidecars keep their
previous meaning. When a multi-entry sidecar has no entry for the client's platform, or two entries
disagree, verification fails closed instead of guessing. The sidecar body is also read up to 16 KiB
instead of 1 KiB, which the published six-entry file exceeded. - Self-update never verified the binary it installed:
ChecksumURLwas declared and implemented but
no caller ever set it — neitherDefaultApplyConfignor the checker's auto-apply path — so
verifySHA256was unreachable in production and an auto-apply replaced the running binary with
whatever bytes the download produced, despite achecksums.txtbeing published next to every release.
The auto-apply applicator now derives the sidecar URL from the release asset URL it already resolved
(releases/download/<tag>/checksums.txt). A download URL that is not HTTPS leaves verification off
rather than pointing the applicator at an address that would fail every update. - Checksum file read limit truncated a published sidecar: the 1 KiB read cap silently truncated the
six-entrychecksums.txt, so even a correct first-line comparison could be reached only by accident.
Added
- Live release check (opt-in):
internal/update/live_release_check_test.goruns the whole
self-update chain against the release this repository actually publishes — discovery through the
GitHub releases API, download of the real published asset, SHA-256 verification against the published
checksums.txt, binary replacement and the staged-restart contract — plus a fail-closed case using
the same artifact. It is skipped unlessVRHUB_LIVE_RELEASE_CHECK=1is set, so CI stays offline, and
it only ever writes inside its own temporary directory.
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.
v0.1.5
Added
- Trailer resolution cascade (Story 11.1): A new
[trailer]config section (language,
optionalyoutube_api_key) drives a three-step resolver: operator override sidecar
({releaseName}.trailerortrailer.url) → OculusDB best-effort → YouTube Data API /
search fallback.ResolveMissingbatch-resolves all games with an emptytrailer_url
at startup and on demand. - Hybrid trailer delivery (Story 11.3): Every named game now exposes a trailer link via
meta.7zand the directory listing. When a specific video URL is resolved it is served
directly; otherwise a YouTube search link (youtube.com/results?search_query=…) is
generated from the configured language. The trailer language is folded into themeta.7z
ETag so a language change automatically invalidates client caches. - Admin Trailers settings (Story 11.3): Power-mode admin settings now include a Trailers
section: a trailer-language dropdown, a write-only YouTube Data API key field (value never
returned by the server), and a "Resolve trailers now" button (POST /admin/api/trailers/resolve)
that triggers on-demand resolution without a server restart. - Multi-folder file watcher (Story 3.5):
game_foldersnow accepts multiple directories.
The watcher visits every configured folder, skipping missing or inaccessible ones with a
warning. A newWatcherManagerserialises Start/Restart/Stop behind a mutex so a
settings-driven folder change restarts the watcher safely without a server restart.
Fixed
meta.7zLast-Modifiedanchor: TheLast-Modifiedresponse header is now derived
fromMAX(last_updated)across all games in the database, not just the subset currently
exposed. Previously, hiding the most-recently-updated game leftLast-Modifiedunchanged,
causing VRHub clients to short-circuit on the matching header and skip the download.- Trailer override on rescan: The operator override sidecar (
{releaseName}.trailer) is
now read and applied when an already-imported APK is rescanned, not only on first import.
Previously, dropping a sidecar next to an existing APK had no effect until a server restart.
v0.1.4
Added
- Games are now automatically enriched with a description and thumbnail fetched from OculusDB. Both are served via new endpoints (
/{hash}/notes.txt,/{hash}/thumbnail.jpg) for VRHub client discovery.
Fixed
- Metadata image downloads are now scoped to imported games only, instead of processing the entire OculusDB catalog (~3,000 entries) on every startup.
- Pre-existing games (imported before this update) now have their icons backfilled automatically on first startup.
- Fixed manual client setup (baseUri + password fields) being broken due to the archive password being displayed in plaintext in the UI while
/config.jsonreturns it Base64-encoded. The UI now shows the Base64 value everywhere it is client-facing. The settings form still uses plaintext.
v0.1.3
Added
- In-app update notifications and changelog. The admin UI now polls
GitHub releases in the background and surfaces available updates on
the Michel dashboard and on a new Power#/updatespage. Release
notes are rendered as Markdown (headings, bold, italic, code, lists,
links) and served from a newGET /admin/api/update/changelogendpoint
with a 5-minute in-memory TTL to avoid burning the GitHub rate limit. - Manual restart endpoint.
POST /admin/api/update/restartaccepts an
operator-initiated restart after a staged update, and the update state
machine now exposes a newrestart-pendingstate. - MetaMetadata CDN image pipeline. Icons and thumbnails are now
downloaded from the MetaMetadata CDN once per release and re-used by
the 7z archive generator (keyed byreleaseName), removing per-request
network calls duringmeta.7zgeneration. - Mode switch keeps Michel users on the dashboard. Toggling mode
from Power into Michel now always lands on the Michel dashboard
regardless of the previous route. The locked design is now reflected
in the UI: Michel is a single-page experience. - Asset cache-busting on embedded static files.
admin.css,
admin.js,setup.cssandsetup.jsare now served with a?v=<semver>
query string derived fromupdate.CurrentVersion, forcing browsers to
fetch the new build after a server restart even whenCache-Control: no-storeis bypassed by an in-memory cache. - Michel "Connecter un client" card. Populated from
fetchConfig(),
removing the previous duplicateGET /config.jsoncall.
Fixed
nilpointer panic on port rebind.liveRebinder.serverand
liveRebinder.routerwere never assigned afternewLiveRebinder(),
so saving a new port in admin settings crashed the server while
persisting the new value to disk. The fields are now wired inmain()
before the listener goroutine starts, andRebind()now performs a
gracefulShutdown(ctx)(10 s timeout) of the old server in a
goroutine to avoid deadlocking the in-flight handler that triggered
the rebind.- TCP listener not released on Windows update+restart. The parent
process held the TCP listener during the 2-second child liveness check,
causingEADDRINUSEand killing both processes on fast machines. The
restart handler now callsShutdown(100 ms grace) before spawning
the child, so the port is free when the child binds. Tested live for
a 0.1.0 → 0.1.2 update+restart. /config.jsonserved stale host/port after admin settings save.
The public handler held a staleConfigpointer after a settings
change.UpdateConfignow invokes anOnConfigUpdatedcallback that
refreshes the pointer used byHandleClientConfigGET. The resolved
listen port is also synced intocfg.Server.Portimmediately after
the-portflag override.- Games silently removed from the DB on metadata parse failure.
Two related fixes: (a) the APK metadata extractor now always retries
withextractViaManifestOnlywhen the primaryapk.OpenFilecall
fails, so valid APKs are no longer skipped on every scan; (b) the
file-system watcher now records every seen APK path in aseenPaths
map and refuses to delete a DB entry whoseapk_pathis still
present on disk. - Multi-section visible during mode toggle.
body.mode-michel #section-dashboard(specificity 1-1-1) was overriding the base
[data-route] { display: none }rule, leaving the previous section
visible when switching to Michel. The defensive CSS rule was removed
(the HTML template already sets the correctdata-route), then
re-added in a more targeted form (body.mode-michel:not([data-route]) #section-dashboard) to keep Michel defensive styling without the
bleed. A short debugsetTimeout/console.logblock in the
modechangehandler was removed. - Michel mode lands on dashboard on toggle. The
modechangehandler
used to send Michel users to thepower-requiredpage whenever they
toggled mode from a Power-only route, and was leaking shared-mode
pages (configuration, client-setup, updates) into the Michel UX.
Both behaviours are now aligned with the locked design: Michel is a
single-page experience and any switch into Michel lands on the
dashboard. - Frontend fetches hanging on a stalled server.
AbortController
with a 10 s timeout was added tofetchServerStatus,populateHeader,
handleRouteClientSetup,fetchPowerConfig,handleRouteConfiguration,
fetchConfig, theloadMichelClientSetupCardsafety-net and
fetchChangelog, so a hung request no longer freezes the UI. - Empty-state on the Power updates page. The "Aucune mise à jour
disponible." message is now toggled on/off insiderenderUpdateCard()
based ondata.versionAvailable, instead of being always-visible
HTML. - i18n coverage on the updates flow. Hardcoded English strings on
the update banner, modal and restart page are now bound through
data-i18n. Nine new FR keys were added toI18N_MICHELand nine
matching EN keys toI18N_POWER. - MetaMetadata URL. The default dataset URL now points to
threethan/MetaMetadata(the canonical community fork). - Card tilt proportionality and rescan button freeze. The 3D tilt
angle is now scaled inversely to element size, and tilt handlers
inside tiltable cards are no longer attached to inner buttons, so
the rescan button no longer freezes on first hover. - Changelog scroll cap on the dashboard. Changelog content divs
are now capped at 280 px withoverflow-y: autoso very long
release notes no longer push the rest of the page. - Update checker config not overridden by stale
Enabled=false.
The router now applies per-field overrides (CheckInterval,
GithubToken,Owner,Repo,AutoApply,AutoRestart) only when
the config has a non-zero value, soDefaultConfig()fallbacks are
preserved. The periodic check is always active. - Copy buttons failing on plain-HTTP admin pages. The copy
buttons now use acopyToClipboard()helper that prefers the async
Clipboard API and falls back todocument.execCommand('copy')for
non-secure-context admin pages. Copy button labels now use the
copy_btni18n key instead of theheader_copiedconfirmation text. Rescandid not persistDataDirtogame_folderswhen using the
fallback path. Rescan now writes the currentDataDirback to
game_foldersso the next scan keeps the working set.game_foldersnot exposed in/admin/api/admin/settings. The
effective configuration endpoint now reports the scanned folders.responseRecorderdid not flush, blocking the SSE monitor
pipeline. AFlush()method was added to the recorder and
MonitorMiddlewareis now wired on the router.
v0.1.2
Fixed
- "Scan failed: Unexpected token '<'" on session expiry: All
fetch()calls in the
admin UI now sendAccept: application/json. Previously, when a session expired the
auth middleware returned an HTML 302 redirect (noAcceptheader → not a JSON client),
fetch()followed it silently, received an HTML login page with HTTP 200, and the
caller's.json()parse threw "Unexpected token '<'…". Sending the header ensures the
middleware returns 401 JSON instead, and the UI displays a proper error message.
v0.1.1
Fixed
- Game URL hash regression: The file-server hash was changed to SHA-256(filepath) in
story 9.10, breaking VRHub URL compatibility. The VRHub client always derives the URL
hash as MD5(releaseName + "\n"); the importer now uses the same algorithm so download
URLs resolve correctly after re-import. - OBB not downloaded for games with subdirectory layout: When the OBB file lives in a
subdirectory of the release folder (e.g.com.Package/main.N.com.Package.obb) the
file listing at/{hash}/{packageName}/omitted it, causing the client to download
only the APK. The listing now injects the OBB basename fromgame.OBBPathwhen it
resides outside the APK directory. The download handler already usedOBBPathdirectly
so no change was needed there. - Admin API returns HTML on session expiry: Routes under
/admin/api/*are JSON
endpoints, but the session-auth middleware returned an HTML 302 redirect when the
session had expired.fetch()calls that omitAccept: application/jsonfollowed the
redirect silently, received an HTML login page with status 200, and failed JSON
parsing — surfacing as "Scan failed: Unexpected token '<'…". All/admin/api/*paths
now always receive a 401 JSON response on auth failure.
v0.1.0
First public release.
Added
- Chi-based HTTP router with setup-mode middleware.
- VRHub-compatible public API:
GET /meta.7z(password-protected AES-256 7z archive)GET /{hash}/andGET /{hash}/{packageName}/HTML directory listingsGET /{hash}/{packageName}/{filename}file download with Range supportGET /config.jsonclient configuration bootstrap
- Admin REST API (X-API-Key, SHA-256 hashed):
- Games CRUD, scan, revalidate, rescan, corruption status
- Admin settings, change password, API key reveal / regenerate
- Backup / restore endpoints
- Update status, apply, reset (GitHub releases)
- Monitoring SSE stream, stats, network status, API documentation
- Admin Web UI (HTML + session cookies):
- Dashboard, configuration widget, games, backup, monitoring
- Login page with secure cookie hardening for LAN access
- Setup wizard endpoints (credentials, archive password, game folders,
scan review, launch). - Background workers:
- File-system watcher with auto-rescan
- Corruption detection and orphan OBB handling
- MetaMetadata fetcher with startup + scheduled refresh (conditional
Last-Modified/ETagrequests) - Auto backup on updates, manual export, restore
- GitHub releases checker with self-apply
- Real-time monitoring and usage statistics
- Network status indicator
- SQLite data layer (
modernc.org/sqlite, pure Go, schema created in code). - TOML configuration via
BurntSushi/toml, with first-run detection that
triggers the setup wizard whenconfig.tomlis missing. - Default data dir: Windows
%APPDATA%/vrhub-server, Unix$HOME/.vrhub-server. - Default listen:
127.0.0.1:39457. - Files served from the scanner-discovered
apk_path, with a legacy
{data-dir}/games/{hash}/{packageName}/fallback and a startup backfill
for older installs. - Cross-platform single static binary for Windows (amd64, arm64),
Linux (amd64, arm64) and macOS (amd64, arm64). - Docker image and
docker-compose.ymlunderdocker/. README.md,docs/set,LICENSE(MIT),CONTRIBUTING.md,
SECURITY.md.
Notes
- Windows binaries ship with a sidecar
vrhub-server.exe.manifest
requestingrequireAdministratorso the firewall helper
(internal/firewall) can callnetsh advfirewallwithout manual
firewall clicks. The helper is a runtime no-op on Linux and macOS. - The embedded 7z helper binaries are bundled for every supported target.