- Rust 95.4%
- Dockerfile 4.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| src | ||
| .dockerignore | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Dockerfile | ||
| LICENSE | ||
| README.md | ||
| renovate.json | ||
tube-proxy
Part of the SI-Tube project: a proxy written in Rust, meant to superseed http3-ytproxy.
URL signing (qhash)
To keep random people from using the proxy as an open YouTube relay, every
proxied request must carry a qhash capability tag: a truncated BLAKE3-256 MAC
over the canonicalized request (sorted query pairs, then path, then the shared
secret). Requests whose tag does not verify are rejected — since the secret is
part of the hash, tags cannot be forged or adjusted to other hosts or
parameters.
| Key | Meaning |
|---|---|
HASH_SECRET |
Required. Shared secret for verifying the qhash tag; must be set to the same value as tube-backend's PROXY_HASH_SECRET. The proxy refuses to start without it. |
ALLOW_INSECURE |
Set to true (or 1) to start without HASH_SECRET for local development, explicitly acknowledging an open proxy. |
The tags are minted by tube-backend (see its PROXY_HASH_SECRET and
docs/API.md, section "Protecting the proxy (signed URLs)"): clients use the
proxy URLs exactly as returned by the API and never construct them themselves.
URLs that the proxy regenerates inside DASH/HLS manifests are re-signed with
the same secret.
The tags are replayable and do not expire on their own — a leaked URL only ever
proxies that one specific upstream resource, and video playback URLs expire
anyway through YouTube's own expire parameter, which the proxy enforces.
Combined with tube-backend's DISABLE_UNAUTHENTICATED setting, signed proxy
URLs are only ever handed out to authenticated users.
Credentials (e.g. a client's Authorization header) are always stripped
from the request before it is forwarded to YouTube and other upstreams — they
are never leaked to third parties.