Commit Graph
20 Commits
Author SHA1 Message Date
michel aaeb62efa4 feat: password resolution via OS keychain and password_cmd
SecretStore trait with a keyring-backed implementation (macOS Keychain,
Windows Credential Manager, Linux Secret Service) under service
soulseek-rs. Precedence: --password/env > keychain > password_cmd from
config.toml. Keychain failures degrade to not-found so headless boxes
fall through to password_cmd.
2026-07-20 20:11:41 +02:00
michel 86e3d8c58f feat: config.toml settings layer (CLI > env > file > defaults)
New persist module in the binary crate (lib stays zero-dep): FileConfig
loaded from a platform-appropriate config path via the directories crate,
with resolution precedence CLI/env (clap) > config.toml > built-in
defaults. Clap defaults move into the resolver so the file layer can sit
between.
2026-07-20 20:10:33 +02:00
Michel de Graaf 2918b0ce75 refactor: resolve all lint findings
- remove 34 trivial restating comments (auto-fix)
- replace all 20 production .unwrap() calls with graceful handling:
  ?-propagation via LockPoisoned, unwrap_or_default on infallible
  conversions, let _ = on actor-channel sends, and a downloads_sender()
  helper in the TUI that also dedupes three channel-init blocks
- collapse nested if into match guard (clippy::collapsible_match)
- split client.rs (2275 lines) into a client/ module: connection,
  search, downloads, uploads, rooms, operations
- split ui/main_tui.rs (2027 lines) into a main_tui/ module: render,
  input, browse, rooms, downloads, search
- extract oversized functions: peer_actor/server_actor handle_message
  into per-message helpers, main() into init_logging/run_default_tui,
  download_selector and main_tui render into per-section helpers

Mechanical only, zero behavior change. Verified: clippy clean
(pedantic+nursery), fmt clean, 143 unit tests + 16 e2e tests against
soulfind pass, lint clean.
2026-07-20 10:53:57 +02:00
michel 5ba2f9e181 feat(net): auto-map the listen port via UPnP-IGD and NAT-PMP
Behind a home router the client is unreachable for incoming peer
connections, so browsing/downloading firewalled peers (and the
server-brokered connect-back) times out. Add a best-effort port mapper
to the binary crate that, when listening is enabled, makes us reachable:

- NAT-PMP (RFC 6886) hand-rolled on std::net::UdpSocket, zero deps, with
  an injectable gateway address so it is fully testable.
- UPnP-IGD via the blocking igd-next crate as the primary path.
- A background PortMapper that discovers off the main thread (never
  blocks startup), renews at half the lease, and removes the mapping on
  drop. Any failure is non-fatal and logged.
- Maps the EXACT listen port only (we advertise it verbatim via
  SetWaitPort, so a different external port would be unreachable) and
  warns the user to forward manually otherwise.

Wired into the TUI, search, and CLI browse (the P2P modes); chat/rooms/
messaging are server-mediated and skip it. e2e-tested against an
in-process mock NAT-PMP gateway: the map request bytes, response parsing,
result-code/timeout handling, and the full spawn -> map -> drop -> unmap
service lifecycle.
2026-07-19 21:10:15 +02:00
michel daac398f68 chore: update Rust toolchain and dependencies to latest
- clap 4.5.51 -> 4.6.2
- ratatui 0.29.0 -> 0.30.2
- cargo update for transitive deps
- toolchains updated: stable 1.97.1, nightly 1.99.0
2026-07-18 12:24:03 +02:00
Ariel D'Alessandro 3696e95760 soulseek-rs: main: Add support for dotenv environment
Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
2026-01-29 19:36:15 -03:00
Michel de Graaf 467de9cb91 chore: bump version 2025-11-13 14:13:28 +01:00
Michel de Graaf 6ca179373f chore: bump version 2025-11-12 21:18:36 +01:00
Michel de Graaf e87853c66a chore: bump version 2025-11-12 02:03:17 +01:00
Michel de Graaf 689e667ade chore: bump version 2025-11-12 01:41:43 +01:00
Michel de Graaf 98a8f53094 feat: improved cli 2025-11-11 23:38:59 +01:00
Michel de Graaf 7bf2748e1f feat: seperate into lib and cli packages 2025-11-11 21:55:53 +01:00
Michel de Graaf a4ece85eaf chore: bump version 2025-11-11 19:01:32 +01:00
Michel de Graaf 9655f09b77 chore: version bump 2025-11-11 14:53:40 +01:00
Michel de Graaf cd3dca40c5 feat: rename module to soulseek-rs 2025-07-31 22:24:34 +02:00
Michel de Graaf 78ac774e82 chore: remove flate2 as dependency for zlib decompression 2025-06-29 21:59:14 +02:00
Michel de Graaf 257920562d feat: implement zlib decompression 2025-06-29 17:37:04 +02:00
michel 066ddadaed chore: make message handlers and dispatcher generic 2025-01-06 22:49:19 +01:00
michel 10f4a34ae4 feat: add missing message handlers 2024-09-13 20:58:04 +02:00
michel 5c56066960 chore: initial commit
semi working version
2024-09-09 08:32:37 +02:00