Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# Local clones of the git dependencies. Cargo fetches its own copies.
/crates

# Local dev-only cargo config (patch/paths overrides pointing at /crates).
.cargo/

# Local runtime state.
/logs
config.toml
Expand Down
65 changes: 33 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 13 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kairo"
version = "4.8.4"
version = "4.8.5"
edition = "2021"
license = "MIT"
description = "Standalone Discord audio sending node, written in Rust. Drop-in Lavalink v4 compatible."
Expand All @@ -9,7 +9,6 @@ description = "Standalone Discord audio sending node, written in Rust. Drop-in L
bytes = "1"
futures-util = "0.3"
libc = "0.2"
mimalloc = "0.1.52"
perf_monitor = "0.2.1"
rand = "0.8"
semver = "1"
Expand All @@ -21,25 +20,29 @@ tracing-appender = "0.2"

[dependencies.lyrics]
git = "https://github.com/bongo-devs/lyrics"
tag = "v0.2.8"
tag = "v0.2.9"

[dependencies.player]
git = "https://github.com/bongo-devs/player"
tag = "v0.1.9"
tag = "v0.1.11"

[dependencies.sources]
git = "https://github.com/bongo-devs/sources"
tag = "v0.1.26"
tag = "v0.1.30"

[dependencies.voice]
git = "https://github.com/bongo-devs/voice"
tag = "v0.1.4"
tag = "v0.1.10"

[dependencies.reqwest]
version = "0.12"
default-features = false
features = ["rustls-tls", "json"]

[dependencies.mimalloc]
version = "0.1.48"
features = ["v3"]

[dependencies.tokio]
version = "1.53"
features = ["tracing", "macros", "signal", "rt-multi-thread"]
Expand All @@ -63,7 +66,7 @@ version = "0.1"
features = ["server-auto", "tokio"]

[dependencies.libmimalloc-sys]
version = "0.1.49"
version = "=0.1.44"
features = ["extended"]

[dependencies.rustls]
Expand All @@ -79,6 +82,9 @@ features = ["derive"]
version = "0.3"
features = ["env-filter", "json", "chrono"]

[dev-dependencies]
tokio = { version = "1.53", features = ["test-util"] }

[profile.release]
lto = "thin"
codegen-units = 1
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ docker compose up -d
```

The node serves port 2333 and reads `/app/config.toml`. Set `KAIRO_CONFIG` to read it from
somewhere else.
somewhere else, and `PORT` to override `server.port` — handy when several instances share one
config file.

## Configuration

Expand Down
50 changes: 41 additions & 9 deletions config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@ playerUpdateInterval = 5 # seconds between playerUpdate messages
[lavalink.server.timeouts]
connectTimeoutMs = 3000 # TCP+TLS connect timeout; 0 = OS default

# Discord voice handshake throttling. A large bot reconnecting 1000+ guilds
# at once would otherwise open that many simultaneous TLS+UDP handshakes and
# starve search/playback HTTP. PATCH answers immediately; connects drain in
# the background through maxConcurrentHandshakes slots.
# [lavalink.server.voice]
# maxConcurrentHandshakes = 32 # live handshakes; rest park (no worker) until a slot frees
# queueWarnMs = 15000 # warn when a queued connect waits past this; the wait itself is unbounded
# handshakeTimeoutMs = 30000 # outer bound per handshake; backstops the voice crate's own 30s abort
# backgroundConnect = false # default; true answers PATCH immediately and connects async
# Outbound IP rotation. Binds each request to an address from these CIDR blocks and
# rotates away from rate-limited ones. A bare address counts as a /32 or /128.
# [lavalink.server.ratelimit]
Expand Down Expand Up @@ -182,6 +173,47 @@ consumerSecret = "bd8a07e9f23fbe9d808646b730f89b8e"
enabled = false
searchLimit = 10

[sources.instagram] # instagram.com/p/..., /reel/... and /reels/... public pages
# Resolves public page metadata only; private and login-gated posts are unsupported.
enabled = false

[sources.audius] # audius.co track URLs + ausearch:
# Uses Audius's public read API and streams accessible tracks.
enabled = false
allowSearch = true
appName = "kairo"

[sources.bilibili] # bilibili.com/video/BV... or /video/av... public pages
# Progressive muxed MP4 only; separate DASH audio/video and multipart streams are unsupported.
enabled = false

[sources.reddit] # reddit.com comments URLs and redd.it post URLs
# Direct public audio links only; Reddit segmented video is unsupported.
enabled = false

[sources.telegram] # t.me/<channel>/<message> public channel posts
# Direct public media files only; private channels and manifests are unsupported.
enabled = false

[sources.tiktok] # tiktok.com/@user/video/<id> public video pages
enabled = false

[sources.twitter] # x.com/<user>/status/<id> public video posts
enabled = false

[sources.vimeo] # vimeo.com/<id> public video pages
# Requires a public progressive MP4; private links and HLS-only videos are unsupported.
enabled = false

[sources.vkmusic] # vk.com/audio... URLs + vksearch:
enabled = false
allowSearch = false
# accessToken = "" # explicitly supplied VK user token; required for track lookup/playback

[sources.yandexmusic] # music.yandex.ru/album/<id>/track/<id>
enabled = false
# token = "" # explicitly supplied OAuth token; required for full playback

[sources.tidal] # tidal.com URLs + tdsearch: / tdrec:
# Metadata only since its streams are DRM-gated, plays through sources.mirror.
# The public API token is scraped from the web bundle.
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ services:
environment:
- RUST_LOG=info
- KAIRO_CONFIG=/app/config.toml
# - PORT=2333
# Commit arena pages on demand rather than up front, worth about 12 MB at idle.
- MIMALLOC_ARENA_EAGER_COMMIT=0
Loading
Loading