{"id":50994444,"url":"https://github.com/bcyran/http2fifo","last_synced_at":"2026-06-20T07:03:47.813Z","repository":{"id":363078444,"uuid":"1261875963","full_name":"bcyran/http2fifo","owner":"bcyran","description":"Mount an HTTP streaming resource as a Unix named pipe (FIFO)","archived":false,"fork":false,"pushed_at":"2026-06-07T10:53:38.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-07T11:20:10.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcyran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-07T09:16:13.000Z","updated_at":"2026-06-07T10:53:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bcyran/http2fifo","commit_stats":null,"previous_names":["bcyran/http2fifo"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/bcyran/http2fifo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcyran%2Fhttp2fifo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcyran%2Fhttp2fifo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcyran%2Fhttp2fifo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcyran%2Fhttp2fifo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcyran","download_url":"https://codeload.github.com/bcyran/http2fifo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcyran%2Fhttp2fifo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34560286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-20T07:03:47.128Z","updated_at":"2026-06-20T07:03:47.807Z","avatar_url":"https://github.com/bcyran.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# http2fifo\n\n\u003e **Hobby project.** This was made out of curiosity and for the fun of learning. It is probably not very useful in practice. It was created with significant AI assistance.\n\nA small Rust tool that bridges an HTTP streaming endpoint to a Unix named pipe (FIFO). Any program that can simply `open()` and read a file can consume an HTTP stream — no HTTP knowledge required on the reader's side.\n\n```\nreader (cat, mpv, ffmpeg, …)  \u003c──  FIFO  \u003c──  http2fifo  \u003c──  HTTP stream\n```\n\n## How it works\n\n`http2fifo` creates a named pipe at a given path, waits for a reader to open it, then fetches the HTTP response and forwards every byte chunk into the pipe. When the stream ends it unlinks the FIFO and loops back, ready to serve the next reader. Cancellation (Ctrl-C / SIGTERM) is handled cleanly — the FIFO is always removed.\n\nMultiple streams can be mounted concurrently with `--mount`.\n\n## Build\n\nRequires Rust 1.96.0 (pinned via `rust-toolchain.toml`; `rustup` installs it automatically). No system OpenSSL needed — TLS is handled by `rustls`.\n\n```bash\ncargo build --release\n# binary: target/release/http2fifo\n```\n\nWith Nix:\n\n```bash\nnix build\n# binary: result/bin/http2fifo\n```\n\nOr run directly without installing:\n\n```bash\nnix run github:bcyran/http2fifo -- https://ice4.somafm.com/dubstep-256-mp3 /tmp/dubstep.fifo\n```\n\n## Usage\n\n### Single stream\n\n```bash\nhttp2fifo \u003cURL\u003e \u003cFIFO_PATH\u003e\n```\n\nStart `http2fifo` first, then open the FIFO in a second terminal (or after a short delay) — the FIFO must exist before the reader tries to open it.\n\n```bash\n# terminal 1\nhttp2fifo https://ice4.somafm.com/dubstep-256-mp3 /tmp/dubstep.fifo\n\n# terminal 2\nmpv /tmp/dubstep.fifo\n```\n\n### Multiple concurrent streams\n\n```bash\nhttp2fifo --mount \u003cURL1\u003e \u003cFIFO1\u003e --mount \u003cURL2\u003e \u003cFIFO2\u003e\n```\n\nPositional arguments and `--mount` are mutually exclusive.\n\n### Options\n\n| Flag | Short | Description |\n|---|---|---|\n| `--method METHOD` | `-X` | HTTP method (default: `GET`) |\n| `--header NAME:VALUE` | `-H` | Request header, repeatable |\n| `--data BODY` | `-d` | Request body |\n| `--fail-fast` | | Cancel all mounts if any one fails |\n| `--log-level LEVEL` | | `off/error/warn/info/debug/trace`; overrides `RUST_LOG` |\n\n### Exit codes\n\n| Code | Meaning |\n|---|---|\n| `0` | All streams finished cleanly |\n| `1` | One or more errors |\n| `130` | Killed by SIGINT |\n| `143` | Killed by SIGTERM |\n\n## Development\n\nA `justfile` provides common tasks:\n\n```bash\njust check     # fmt check + lint + tests (full CI suite)\njust fmt       # auto-format\njust test      # run tests\njust fix       # fmt + lint --fix\n```\n\nCI runs `just check` on every push via GitHub Actions.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcyran%2Fhttp2fifo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcyran%2Fhttp2fifo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcyran%2Fhttp2fifo/lists"}