web/build.mjs builds a static site, web/dist, with the icons and typeface beside the pages; Dockerfile.web serves it with Caddy, which passes /api and /media to ipx on the same origin, so cookies, live updates and Cloudflare Access work as before. ipx serves no page any more: build.rs and every include_str! of the web files are gone, and its image is built without node. What ipx did to the page as it served it is kept another way. Caddy asks ipx before serving a page (forward_auth): /api/page-check sends a browser not signed in to /login and a non-admin away from /admin, and refuses them /admin.js; /api/login-check sends someone Access vouches for past the form; a page asked for with ?token= goes to /api/signin, which sets the cookie. The theme and the admin link, once written into the page per person, are set by web/boot.js in <head> from the theme cookie and the last visit, before the first frame, and /api/me brings the version and the account's theme from before. Caddy strips the Cf-Access-* headers from every peer but TUNNEL_PEER, the address cloudflared's requests come from, which is the boundary trusted_proxies drew; ipx then trusts only Caddy's address. The browser suite runs Caddy in front of its daemon, so it tests what production would run. Not deployed: production's cutover is on #203. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
86 lines
3.7 KiB
Markdown
86 lines
3.7 KiB
Markdown
# ipx
|
|
|
|
A self-hosted podcatcher for a household. It checks your feeds, downloads the episodes, and serves
|
|
a web UI modelled on the 2004 Mac app **iPodderX**, for any number of people sharing one copy of
|
|
the files. One Rust binary, `ipx`, is both the daemon and the command line.
|
|
|
|
It is a rewrite of [ipodderx-core](https://git.sdf1.net/rays/ipodderx-core), the Python engine
|
|
behind iPodderX (2004-2008, Ray Slakinski & August Trometer).
|
|
|
|
## What it does
|
|
|
|
- **The web UI.** It has a toolbar, and a feed list that opens with the Directory, Currently Listening and All
|
|
Subscriptions. Items sit in a sortable table with a Files pane, and there is a player bar. It
|
|
comes in Dark, Light and Classic themes, and works on a phone.
|
|
- **Several people, one copy.** Each person has their own subscriptions and their own read, pinned
|
|
and playback state. There is one file on disk per episode, however many people want it. People
|
|
sign in with a password or through a proxy (Cloudflare Zero Trust or Authentik), and admins
|
|
manage accounts and settings.
|
|
- **Scanning.** Feeds are checked on a schedule, globally or per feed, and a feed's own TTL is
|
|
honoured. Keyword, explicit-content and media-type filters decide what is downloaded, with a limit
|
|
on how many of a feed's newest episodes are downloaded.
|
|
- **Downloads.** Files come over HTTP or BitTorrent and are filed into a folder per feed.
|
|
Retention deletes the oldest files to stay under a disk quota or an age limit, and never touches
|
|
an item someone has pinned.
|
|
- **OPML.** You can import and export your own subscriptions. You can also subscribe to an OPML
|
|
URL, which keeps a whole list in step as a folder.
|
|
|
|
## Run it
|
|
|
|
With Docker:
|
|
|
|
```sh
|
|
docker build -t ipx .
|
|
docker build -f Dockerfile.web -t ipx-web .
|
|
docker compose up -d
|
|
```
|
|
|
|
`docker-compose.yml` is a sample: ipx, with its database in SQLite and its three volumes
|
|
(`/config`, `/data` and `/downloads`) in folders beside the file, and ipx-web, the page, served by
|
|
Caddy in front of it. Change them to suit. The UI is on port 8099. BitTorrent uses 6881
|
|
over TCP and UDP. Files are written as `PUID`/`PGID`, 99:100 by default.
|
|
|
|
From source:
|
|
|
|
```sh
|
|
cargo build --release
|
|
./target/release/ipx daemon
|
|
```
|
|
|
|
The first start creates **admin / ipodderx**. Sign in at `/login`, then change it:
|
|
|
|
```sh
|
|
echo -n 'a good password' | ipx user passwd admin
|
|
```
|
|
|
|
The UI is plain HTTP, so put TLS in front of it if it is reachable from outside your network.
|
|
|
|
## Documentation
|
|
|
|
| | |
|
|
|---|---|
|
|
| [docs/configuration.md](docs/configuration.md) | Every config key, path and environment variable |
|
|
| [docs/cli.md](docs/cli.md) | Every command, including `ipx user` |
|
|
| [docs/users.md](docs/users.md) | Accounts, and what several people share |
|
|
| [docs/sso.md](docs/sso.md) | Signing in through Cloudflare Zero Trust or Authentik |
|
|
| [docs/architecture.md](docs/architecture.md) | How it works: modules, schema, control socket, HTTP API |
|
|
| [CHANGELOG.md](CHANGELOG.md) | What changed, by release |
|
|
| [CLAUDE.md](CLAUDE.md) | Notes for working on the code, including how production is deployed |
|
|
|
|
## Tests
|
|
|
|
```sh
|
|
cargo test # the engine: parsing, filters, retention, schedules, SQL, per-user state
|
|
node tests/page-smoke.js # the page script loads without throwing
|
|
node tests/native-bridge.js # the page hands playback to a native shell
|
|
npx playwright test # a real browser against a real daemon on fixture feeds
|
|
```
|
|
|
|
`npm install` gets the test runner, and `npx playwright install --with-deps chromium` gets the
|
|
browser.
|
|
|
|
## License
|
|
|
|
MIT, see [LICENSE](LICENSE). The icons are [Font Awesome Free](https://fontawesome.com) 7.3.1 by
|
|
@fontawesome, under [CC BY 4.0](https://fontawesome.com/license/free), embedded as SVG.
|