dd41f1961f
Pinned exactly (=9.0.0-rc.0) — no v9 stable exists yet, so a caret range would silently drift onto a future prerelease. Two source changes were needed for the upgrade: - `torrent_from_bytes_ext` moved to `librqbit_core::torrent_metainfo:: torrent_from_bytes` and no longer wraps the result in a `meta` field. - `peer_stats.live` / `.not_needed` are now `u32`, so the casts are redundant. v9 also adds `SessionOptions::bind_device_name`, which is the reason for the upgrade: it applies SO_BINDTODEVICE to every librqbit socket — peer connections, trackers, DHT and LSD. Binding those to a VPN interface means that when the interface goes away the sockets error out instead of falling back to the host route, giving a kernel-enforced kill switch. Exposed as --bind-device / TORAD_BIND_DEVICE; unset reproduces today's behaviour exactly. Note that `listen` stays at its default of None, so there is no listener and no uTP socket in either direction — torad is TCP-only and leech-only. That is unchanged from v8 but now written down, since incoming connections need NAT-PMP port forwarding that we have not built. Also drops torad's `nix` pin from 0.29 to 0.31.3 to match the sibling tora crate; the workspace was carrying three copies. Verified end-to-end against a real swarm rather than by compiling alone: a 755 MiB torrent added via HTTP .torrent URL, driven through pending -> downloading -> finished, with pause/resume on an active torrent, remove, and the notification stream all exercised. Evidence in .omo/evidence/task-5-torad-vpn-namespace.txt. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
24 lines
961 B
TOML
24 lines
961 B
TOML
[package]
|
|
name = "torad"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
|
|
[dependencies]
|
|
anyhow = "1.0.103"
|
|
async-trait = "0.1"
|
|
clap = { version = "4.6.1", features = ["derive", "env"] }
|
|
librqbit = { version = "=9.0.0-rc.0", default-features = false, features = ["rust-tls", "http-api-client"] }
|
|
librqbit-core = { version = "=9.0.0-rc.0", default-features = false }
|
|
nix = { version = "0.31.3", features = ["user", "sched", "fs", "process"] }
|
|
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] }
|
|
sha1 = "0.10"
|
|
sqlx = { version = "0.9.0", features = ["postgres", "runtime-tokio", "tls-rustls", "uuid"] }
|
|
tokio = { version = "1.52.3", features = ["rt-multi-thread", "macros", "net", "signal"] }
|
|
tokio-stream = { version = "0.1.18", features = ["net"] }
|
|
tonic = "0.14.6"
|
|
tonic-health = "0.14.6"
|
|
tora-proto = { version = "0.1.0", path = "../proto" }
|
|
tracing = "0.1.44"
|
|
tracing-subscriber = "0.3.23"
|
|
uuid = { version = "1.23.4", features = ["v4"] }
|