Split: ipx uses the directory service #205
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).
ipx uses the directory service instead of its own directory.
settingstable: Directory URL (empty by default), Access token (write-only: never returned by/api/settings), Share subscriptions (off by default)./api/popular,/api/directoryand/api/directory/{id}ask the directory and add whether each feed is yours. The browser never talks to the directory. With no URL set, the Directory and Popular views say no directory is configured, and feeds are added by URL.looks_private()catches, an OPML or Patreon creator itself, or a feed marked unlisted.looks_private()is a heuristic: a key in the path of a host it does not know gets through.web.rs, the "popular on this server" section) goes; its privacy tests move to the snapshot builder.The settings go in a Directory section of the admin page in the web interface (web/admin.html), not only the API: Directory URL, Access token (a field that shows whether one is set, never the token itself, with Replace and Clear), Share subscriptions, and the token's name and access level once the directory answers
/v1/me, or why it did not (unreachable, 401 revoked, 403 read-only while sharing is on). New UI, so mockups on this issue for approval before it merges.Private feeds stay private: none ever goes to the directory. The per-feed flag is called private, not unlisted. A feed is private when it is marked so, when it has a username or password, or when
looks_private()catches its address (a paid host, or a key in the query). The snapshot builder leaves out all three, and the directory refuses anythinglooks_private()catches as well. Tests cover each case.Built on the branch
directory-client(c47aa57), not merged or deployed: this is the new UI for approval. All suites pass (Rust 117 + 11 + 30, Playwright 73, a new browser test for this).Admin, Directory: a new tab. Address, token (write-only: it says "Set" and offers Clear, never shows it), the share switch, and a status line saying who the directory takes this server to be and how the last snapshot went, or why it refused.
A feed's settings: a Private switch at the end. Anyone subscribed can turn it on; only an admin can turn it off. A feed whose address or login shows it is private has it on and locked, with a line saying why (second Glass shot, the fixture's paid feed).
The Directory with no directory set up: says so, in place of the grid.
The Directory itself is unchanged in layout. Its wording changes: "N shared by iPX servers" instead of "on this server", "N people subscribe" instead of "people here subscribe".
Decisions that are yours:
On approval I merge and deploy, then set production's directory address and Tower's token (/mnt/fast/appdata/ipx-directory/tower.token) in the admin page, and turn sharing on.
Approved as built. Merged as
c47aa57and deployed with ipx-directory. Production's Admin, Directory is set to https://ipx-dir.sdf1.net with Tower's rwa token, sharing on: the first snapshot sent 1471 feeds, none refused; the directory lists each once it has fetched it (193 so far).