Skip to content

v0.7.0 — network remotes (HTTP + SSH)

Choose a tag to compare

@BangRocket BangRocket released this 03 Jun 19:34
· 199 commits to main since this release

mcadiff is now a distributed VCS — push / fetch / clone over the network, not just the local filesystem. A remote URL can be a path, http(s)://, or ssh://. Because objects are content-addressed, transfer copies only what the other side lacks.

HTTP (built-in daemon)

git's model: anonymous read, authenticated push.

mcadiff -C <repo> serve --port 8421 --allow-push --token s3cret
mcadiff clone http://host:8421 ./world.mcagit        # anonymous read
mcadiff push origin main --token s3cret              # authenticated push

Push is rejected (401) without the token; --allow-push is required for any write. Uploaded objects are integrity-checked (decompress + SHA must match the name), so a bad peer can't poison the store.

SSH (no daemon)

Runs mcadiff serve-stdio on the remote over your ssh session; auth & encryption are ssh's job (keys/agent). Requires mcadiff installed on the remote.

mcadiff clone ssh://user@host/path/to/world.mcagit ./world.mcagit
mcadiff push  ssh://user@host/path/to/world.mcagit main

Under the hood

A single transport abstraction (IRemoteTransport) means clone/fetch/push are written once; filesystem, HTTP, and ssh are just transports. The filesystem path was refactored onto it with no behavior change.

75 tests (was 72): live HTTP push/clone + token auth against an in-process server, and the ssh stdio protocol (clone + push) over in-memory pipes. Verified end-to-end on the example worlds — HTTP push of 4,389 objects then a 0-object re-push, anonymous clone, 401 without a token, and the cloned-over-HTTP world checks out byte-clean.

Limitations

Per-object transfer (no packfiles/delta yet); the HTTP daemon is simple (single token, no TLS — front it with a reverse proxy for https). No staging index.