Commit graph

62 commits

Author SHA1 Message Date
Roderick van Domburg
383a6f6969
Update Cargo.lock 2024-10-30 21:11:33 +01:00
Benedikt
94d174c33d
Discovery: Refactor and add Avahi DBus backend (#1347)
* discovery: use opaque error type for DnsSdError

This helps to decouple discovery and core by not leaking implementation
details of the zeroconf backend into Error conversion impls in core.

* discovery: map all MDNS/DNS-SD errors to DiscoveryError::DnsSdError

previously, libmdns errors would use a generic conversion
from std::io::Error to core::Error

* discovery: use an opaque type for the handle to the DNS-SD service

* discovery: make features additive

i.e. add with-libmdns instead of using not(with-dns-sd).

The logic is such that enabling with-dns-sd in addition to the default
with-libmdns will still end up using dns-sd, as before.
If only with-libmdns is enabled, that will be the default.
If none of the features is enabled, attempting to build a `Discovery`
will yield an error.

* discovery: add --zeroconf-backend CLI flag

* discovery: Add minimal Avahi zeroconf backend

* bump MSRV to 1.75

required by zbus >= 4

* discovery: ensure that server and dns-sd backend shutdown gracefully

Previously, on drop the the shutdown_tx/close_tx, it wasn't guaranteed
the corresponding tasks would continue to be polled until they actually
completed their shutdown.

Since dns_sd::Service is not Send and non-async, and because libmdns is
non-async, put them on their own threads.

* discovery: use a shared channel for server and zeroconf status messages

* discovery: add Avahi reconnection logic

This deals gracefully with the case where the Avahi daemon is restarted
or not running initially.

* discovery: allow running when compiled without zeroconf backend...

...but exit with an error if there's no way to authenticate

* better error messages for invalid options with no short flag
2024-10-26 16:45:02 +02:00
Guillaume Desmottes
1912065248
Cargo: use rust-version from workspace (#1375)
Make it easier to check and update.
2024-10-17 17:01:56 +02:00
Roderick van Domburg
e73a08d43a
Remove garbage toml-e files from last publish 2024-10-15 21:23:09 +02:00
Roderick van Domburg
a974a71cc4
Update Cargo.lock 2024-10-15 20:38:42 +02:00
Roderick van Domburg
84d28e887b
Update Cargo.lock 2024-10-15 20:34:15 +02:00
Ernst
0ddb3b4cb6
Exposing service to both IPv4 and IPv6, addressing remaining issues from # (#1366)
* create dual stack socket on non-windows systems only

---------

Co-authored-by: Anders Ballegaard <giithub@anderstb.dk>
2024-10-06 22:11:57 +02:00
Nick Steel
b1180fb674
Remove unused deps (#1352) 2024-09-30 21:31:26 +02:00
David Sheets
8fab3d66e2
discovery::server: fix activeUser field of getInfo (#1235) 2024-09-14 18:44:07 +02:00
yubiuser
dcd592bafb
Update MSRV to 1.74.0 and sysinfo to 0.31.3
Signed-off-by: yubiuser <github@yubiuser.dev>
2024-08-27 23:16:48 +02:00
Will Stott
2c871bbc96 Bump libmdns from 0.8.0 to 0.9.1 2024-08-24 17:31:34 +01:00
Joey Eamigh
180ffacde1
adding flag to show connect device as group 2024-06-15 23:36:47 -04:00
Christian König
b0170d142b
Bump MSRV to 1.73
Signed-off-by: Christian König <ckoenig@posteo.de>
2024-06-10 18:50:38 +00:00
Christian König
90625a71d0
Update base64 to 0.22
Signed-off-by: Christian König <ckoenig@posteo.de>
2024-06-10 16:31:01 +00:00
George Hahn
e1113dd5e2 cargo fmt 2024-06-06 21:37:26 -06:00
George Hahn
da0deb1de6 Convert discovery to hyper 1.x 2024-06-06 03:36:24 -06:00
George Hahn
98a97588d3 Enable deprecation warnings and address 2024-06-06 03:06:44 -06:00
Christian König
ca035c9d17
Set MSRV in Cargo.toml files to 1.71
Signed-off-by: Christian König <ckoenig@posteo.de>
2024-05-11 19:03:06 +00:00
Christian König
c28cf29858
Update libmdns to 0.8
Signed-off-by: Christian König <ckoenig@posteo.de>
2024-02-24 21:01:09 +01:00
David Sheets
098c056677 discovery::server: fix startup log 2023-12-06 11:58:08 +00:00
yubiuser
e8c3ee07ef
Update base64 (#1148) 2023-04-13 20:02:33 +02:00
Guillaume Desmottes
7f2cb684c9 fix clippy warnings 2023-01-03 00:36:35 +01:00
setime
bf7cbbaadd
Add an option to specify IPs that zeroconf will bind to (#1071)
* added an option to specify ip addresses to which mDNS should bind (ignored by `DNS-SD`)
* changed command line option to `zeroconf-interface` to be consistent with `zeroconf-port`
use builder pattern to DRY up the code
used macro to print warning message
* fixing register error
* renamed `bind_ip` variables to match the option to `zeroconf_ip`, to be more consistent
* Changed user help
Modified comments
Added block for condition to clean the code
Added new modification to the change log

Co-authored-by: setime <timeframe1@gmx.de>
2022-11-25 09:57:14 +01:00
JasonLG1979
ce9eb42469 Fix fmt lint from 05dcb652a0 2022-10-01 19:51:55 -05:00
Roderick van Domburg
05dcb652a0
Fix example 2022-10-02 00:08:36 +02:00
Roderick van Domburg
bae304fdb0
Update zeroconf fields and publish active user 2022-10-02 00:00:30 +02:00
Roderick van Domburg
2a79af1f0a
Migrate to Rust 2021 2022-08-02 21:42:38 +02:00
sqozz
d09ee4206c Add minimum rust version 2022-08-01 15:14:17 +02:00
Roderick van Domburg
786f8832d1
Update version numbers to 0.5.0-dev 2022-07-30 22:28:12 +02:00
Roderick van Domburg
37794c5b78
Merge branch 'new-api' into dev 2022-07-29 23:39:06 +02:00
Roderick van Domburg
6537c441c3
Update Cargo.lock 2022-07-29 22:05:10 +02:00
Roderick van Domburg
05b9b13cf8
Merge branch 'dev' into new-api and update crates 2022-07-27 23:31:11 +02:00
Roderick van Domburg
88e64bd884
Update Cargo.lock 2022-05-23 21:43:16 +02:00
JasonLG1979
c03d3ad102 Bump deps
This bumps deps that don't need major code refactoring or MSRV bumps.
2022-05-23 10:19:54 -05:00
Roderick van Domburg
dff19377fa
Update version numbers to 0.4.0 2022-05-21 22:31:15 +02:00
Roderick van Domburg
2a3e248bba
Fix clippy lints 2022-05-21 21:36:56 +02:00
Hugo Osvaldo Barrera
c4af90f5fe Avoid crashing when Avahi is not available
When librespot is built with Avahi turned on, it will crash if Avahi is
later not available at runtime.

This change avoids it crashing hard when Avahi is not available;
librespot will merely warn of the issue.

This affects some distribution packages too, where the maintainer might
prefer leaving Avahi support enabled, but many setups don't (or can't)
run Avahi.

Co-authored-by: Nick Steel <nick@nsteel.co.uk>
2022-05-20 08:39:20 +02:00
Gnarflord
10c9a0f8ea
Use libmdns 0.7 to avoid packet 47 error 2022-05-19 18:37:21 +02:00
JasonLG1979
d887d58251 Fix clippy warnings 2022-03-20 10:52:08 -05:00
Roderick van Domburg
59d00787c9
Update player crates and transitive dependencies 2022-01-09 16:04:53 +01:00
Roderick van Domburg
56f3c39fc6
Update hmac, pbkdf2, serde, serde_json, sha-1 2022-01-09 00:25:47 +01:00
Roderick van Domburg
5a8bd5703c
Update tokio and hyper-rustls 2022-01-08 23:28:46 +01:00
Roderick van Domburg
89a5133bd7
Upgrade aes-ctr to latest aes 2022-01-08 20:51:51 +01:00
Roderick van Domburg
c1965198fc
Move DeviceType to core 2022-01-06 09:48:11 +01:00
Roderick van Domburg
cc9a574b2e
Move ConnectConfig to connect 2022-01-05 21:15:19 +01:00
Roderick van Domburg
9b6e02fa0d
Prevent a few potential panics 2021-12-29 23:15:08 +01:00
Roderick van Domburg
643b39b40e
Fix discovery compilation with-dns-sd 2021-12-27 00:47:17 +01:00
Roderick van Domburg
95776de74a
Fix compilation for with-dns-sd 2021-12-27 00:21:42 +01:00
Roderick van Domburg
b4f7a9e35e
Change to parking_lot and remove remaining panics 2021-12-26 23:02:02 +01:00
Roderick van Domburg
62461be1fc
Change panics into Result<_, librespot_core::Error> 2021-12-26 21:18:42 +01:00