HTTP Endpoints
moq-relay exposes HTTP/HTTPS endpoints via TCP too. These were initially added for debugging but are useful for many things, such as fetching old content.
Configuration
The relay supports both HTTP and HTTPS, configured independently:
[web.http]
# Listen for unencrypted HTTP connections on TCP
listen = "0.0.0.0:80"
[web.https]
# Listen for encrypted HTTPS connections on TCP
listen = "0.0.0.0:443"
cert = "cert.pem"
key = "key.pem"WARNING
HTTP is unencrypted, which means any authentication tokens will be sent in plaintext. It's recommended to only use HTTPS in production.
Notable Endpoints
GET /announced/*prefix
Lists all announced broadcasts matching the given prefix.
# All broadcasts
curl http://localhost:4443/announced/
# Broadcasts under "demo/"
curl http://localhost:4443/announced/demo
# Specific broadcast
curl http://localhost:4443/announced/demo/my-streamGET /fetch/*path
Fetches a specific group from a track, by default the latest group. Useful for quick debugging without setting up a full subscriber, or for fetching old content.
The path is /<broadcast>/<track>, where the last segment is the track name and everything before it is the broadcast path.
# Get latest catalog from broadcast "demo/my-stream"
curl http://localhost:4443/fetch/demo/my-stream/catalog.json
# Get a specific video group from broadcast "demo/my-stream"
curl http://localhost:4443/fetch/demo/my-stream/video?group=42TIP
Use HTTP fetch for catch-up and historical data. Use MoQ subscriptions for the live edge. The two complement each other — HTTP is request/response, MoQ is pub/sub.
GET /certificate.sha256
Returns the SHA-256 fingerprint of the TLS certificate. This is only useful for local development with self-signed certificates.
curl http://localhost:4443/certificate.sha256
# f4:a3:b2:... (hex-encoded fingerprint)See Also
- Relay Configuration - Full config reference
- Clustering - Multi-relay deployments
- hang format - Groups, keyframes, and container details