Dxcufgb's Workshop

How the Proxy Works

WIPWork in progress: may be very buggy and can change a lot between versions.

Foundry ──manifest URL──▶ proxy ──token──▶ GitHub API (latest release, manifest asset)
Foundry ◀── manifest with download/manifest rewritten to the proxy
Foundry ──download URL──▶ proxy ◀── pre-signed GitHub URL (no token): the zip streamed through, module.json patched

Requests

Request Result
GET /<module-id>/module.json manifest of the latest release (manifest and download rewritten to the proxy)
GET /<module-id>/<tag>/module.json manifest of that tag, rewritten the same way
GET /<module-id>/<tag>/module.zip that tag's zip with its module.json pointing at the proxy (why); 302 to the pre-signed GitHub download when it cannot be patched or PATCH_ZIPS=off
GET /<world-id>/world.json, GET /<world-id>/<tag>/world.json, GET /<world-id>/<tag>/world.zip the same for an entry with "type": "world" (backed-up worlds): its world.json rewritten, its zip with the world.json inside patched
/_admin/ and /_admin/api/... the administration page (404 while it has no password)
anything on ADMIN_PORT (if set) the admin page only, over HTTPS: / → 302 /_admin/, plain http:// → 301 https://
GET /_admin/certificate.crt on ADMIN_PORT the port's self-signed certificate (never the key), to trust it; 404 for a certificate from a real CA, on plain HTTP and on the proxy's own port
POST/PUT/DELETE outside /_admin/ 405 (the proxy routes are GET/HEAD only)
anything else / unknown module / missing asset or release / world.* for a module or module.* for a world 404
GitHub error, or a GitHub download redirect that is not https:// 502 (log shows module id and GitHub status, never the token)

Rewritten links always use PUBLIC_BASE_URL, never the request's Host header. A 404 for a release can also mean the token cannot see that repo (GitHub hides private repos with 404), so check the token's repository access first.

How the zip is patched is described in Module zips and updates.

This page mirrors the Private GitHub Proxy wiki on GitHub.