Split: the directory service at ipx-dir.sdf1.net #204
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of splitting ipx into a directory service, a backend and a frontend (see the tracking issue).
A new service,
ipx-directory(crates/directory), at https://ipx-dir.sdf1.net: a catalogue of public podcasts that ipx servers share. It is metadata only: it never downloads a file, and each ipx server still fetches its own feeds.Data: its own Postgres database (
ipx_directory). Per feed: URL, title, art, category, description, whether it carries audio or video, and its latest twenty items (title, link, date, length, text). Feed id is a hash of the normalised URL, so every instance agrees on it. A slow refresher fetches each feed with conditional GET, usingcrates/feed.Access: a config file, no admin UI, no token database:
ro: browse.rw: browse and send snapshots.rwa: also admin (below).ipx-directory token new <name> --access ro|rw|rwaprints a random token and the lines to paste.API
GET /v1/meGET /v1/feeds,GET /v1/popular,GET /v1/feeds/{id}POST /v1/snapshot[{url, subscribers}], replacing that token's last snapshot; popular is the sum of every token's latestDELETE /v1/feeds/{id}GET /v1/blocked,DELETE /v1/blocked/{id}DELETE /v1/instances/{name}POST /v1/feeds/{id}/refreshA snapshot is checked with
looks_private()again on arrival, as well as before it is sent, and anything private is refused.Deploy: image
192.168.1.130:5000/ipx-directory, a service in Arcane, its database on thedatabasesPostgres, the tunnel route for ipx-dir.sdf1.net, JSON logs for Loki.Done in
83bda97(and the Dockerfile fix after it). Live at https://ipx-dir.sdf1.net: ipx-directory in the ipx Arcane project, database ipx_directory on the databases Postgres (covered by db-backup's ALL), tunnel route with no Access. One change from the plan: tokens are in directory.toml as SHA-256 hashes, not env vars, so adding one is a file edit too, not only revoking. Tower's rwa token is in /mnt/fast/appdata/ipx-directory/tower.token until #205 puts it in ipx's settings. Checked: a feed snapshot, a Supercast address refused as private, a refresh of The Daily with its category and 20 items and no file addresses; 401 without a token from the public address. Not done: Cloudflare rate limiting in front (tokens gate everything, so it is left until the log shows a need); following a feed that moved for good (ponytail comment in refresh).