Go to file
2023-05-09 09:00:56 +03:00
src docs: update readme 2023-05-09 08:46:28 +03:00
.env.example docs: add .env config example 2023-05-09 08:58:22 +03:00
.gitignore ignore dot vscode and dot envrc 2023-04-21 19:46:21 +03:00
Cargo.lock feat: implement sharing a single music 2023-05-09 07:29:35 +03:00
Cargo.toml feat: implement sharing a single music 2023-05-09 07:29:35 +03:00
flake.lock chore: init 2023-04-18 00:08:04 +03:00
flake.nix feat: implement sharing a single music 2023-05-09 07:29:35 +03:00
README.md docs: update readme 2023-05-09 09:00:56 +03:00
rust-toolchain.toml initial impl 2023-04-21 18:48:39 +03:00

musikquadrupled

A proxy server for musikcubed that implements TLS, alternative authentication solution, CORS for proper Web support and a few extra goodies. Compatible with musikcube.

Configuration

The configuration is done via MUSIKQUAD_* environment variables. Alternatively you can also provide a .env file in the same directory as the binary or a parent directory, which will be readed and loaded as environment variables.

See .env.example for a commented .env file.

API (public)

All of the musikcubed APIs are implemented. On top of those:

  • share/generate/:external_id: Returns a "scoped token" for the specified ID of a music. This allows one to access share/* APIs. The token query parameter must be present and must have a valid token, if not 401 Unauthorized will be returned.
  • share/audio/:scoped_token: Returns the music (or a range of it if RANGE header is present) corresponding to the specified scoped_token. Returns 404 Not Found if the requested music isn't available.
  • share/info/:scoped_token: Returns information (title, album, artist etc.) of the music corresponding to the specified scoped_token in JSON. Returns 404 Not Found if the requested music isn't available.
  • share/thumbnail/:scoped_token: Returns the thumbnail for the music corresponding to the specified scoped_token. Returns 404 Not Found if the requested thumbnail isn't available.

API (internal)

These are only exposed to localhost clients.

  • token/generate: Generates a new token for use with the token query paramater in the public APIs.
  • token/revoke_all: Revokes all tokens.