Also remove find_and_uninstall_device for split tunnel since it is a
legacy driver without a devnode
Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>
Previously we had two types in the code base that dealt with
version parsing. This commit unifies these types so that we only
use the Version struct that is defines in the mullvad-version crate.
This also solves a bug where the daemon code would crash on alpha
versions, as the previous version parsing code didn't handle them.
`err_derive` is unmaintained and will probably stop working with rust
edition 2024. `thiserror` is almost a drop-in replacement. This commit
simply replaces all occurences of `derive(err_derive::Error)` with
`derive(thiserror::Error)` and fixes the attributes, but the Error and
Display impls should be identical.
Since Rust 1.75.0 the `version` field is optional. The version
defaults to "0.0.0" if it's not specified, and `publish` defaults
to false if no version has been given. So by not specifying
a version we get both `version = "0.0.0" and `publish = false`
"for free"
Previously, the `mullvad-api` would tell the `mullvad-daemon` that it
wanted a new API endpoint by calling a certain callback
(`ApiEndpointUpdateCallback`), which would asynchronously resolve a new
API endpoint and tell the daemon to punch an appropriate hole in the
firewall for that particular endpoint before the `mullvad-api` crate
would consume it.
The logic of the callback can be moved inside `AccessModeSelector`,
which simplifies the contract between `mullvad-daemon` and `mullvad-api`
somewhat.
To align more with the upcoming standardizations within the Rust
ecosystem which started with the release of `1.70.0` and the inevitable
deprecation of `lazy_static`.
Sometimes when removing a device when uninstalling the app, a `404` is
returned if the device has already been revoked from the account.
However, removing a non-existent device should not be considered an
error if the end goal is to not have the device on the account. That
goal has clearly already been achieved.