summaryrefslogtreecommitdiffhomepage
path: root/mullvad-management-interface/src/lib.rs
AgeCommit message (Collapse)AuthorFilesLines
2025-09-30Add user-facing Error for when access method with same name existsTobias Järvelöv1-0/+4
2025-07-10Run `cargo fmt`Sebastian Holmin1-2/+2
2025-07-09Put the `tonic::Status` in a Box to make the error type smallerSebastian Holmin1-1/+9
2024-09-25Upgrade `tonic` to 0.12 and `prost` to 0.13Sebastian Holmin1-1/+3
Upgrading `tonic` is a prerequisite to later on upgrading `hyper` to version 1.0. As of version 1.0, `hyper` no longer uses `tokio`s `AsyncWriter` and `AsyncReader` traits, instead defining its own versions, see <https://github.com/hyperium/hyper/issues/3110>. As tonic `0.12` is updated to use the `hyper 1.0` ecosystem, it changed some of its trait-bounds to the new `hyper` traits. The `hyper-utils` crate provides the wrapper `TokioIo`, which converts between the two. `prost` had to be upgraded as well, for compatibility.
2024-08-27Use std LazyLock instead of once_cell LazyDavid Lönnhager1-3/+3
2024-08-06Shut down gRPC server gracefullyMarkus Pettersson1-2/+6
This commit also removes the `EventListener` trait and the daemon is no longer parameterized over it.
2024-06-17Get value of data directory value at app startupMarkus Pettersson1-6/+11
Remove `APP_PATH` from `mullvad-paths` on Android since it should not be a constant value. Instead, it is passed down from the Android app startup. As it turns out, it is really ever used for pointing to the RPC socket in use.
2024-04-18Limit the size of custom list names to 30 graphemesEmīls1-0/+1
2024-02-27Replace err_derive with thiserrorJoakim Hulthe1-35/+34
`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.
2023-10-09Code cleanupMarkus Pettersson1-0/+3
- Refactor `RemoveApiAccessMethod` to be based on UUID - Remove debug-prints in `mullvad api-access list` et al - Get rid of `GetApiAccessMethods` RPC - Use the more generic RPC `GetSettings` to get hold of all API access methods instead - Rename `mullvad_types::access_method` to `mullvad_types::api_access` - Remove (unjustified) `#[inline(always)]` attributes
2023-10-09Refactor protobuf `ApiAccessMethod` definitionsMarkus Pettersson1-0/+3
- Replace rpcs `ReplaceApiAccessMethod` and `ToggleApiAccessMethod` in favor of a commmon `UpdateApiAccessMethod` (which resembles `ReplaceApiAccessMethod` in a lot of ways). - `UpdateApiAccessMethod` works with unique identifiers instead of array indices to pinpoint which API access method to update. - Toggling an API access method to be enabled/disabled now happens via `UpdateApiAccessMethod` - Add the useful `UUID` protobuf type definition, which conveys more information that a raw string. - Refactor `SetApiAccessMethod` to use API access method ID - Update `ApiAcessMethod` messages to use `UUID` type for uuid values - Use unique id for removing custom `ApiAccessMethods`
2023-09-27Refactor custom list implementationDavid Lönnhager1-5/+0
2023-08-30Fix clippy lintsEmīls1-1/+1
2023-08-04Replace all use of `lazy_static` with `once_cell`Markus Pettersson1-4/+4
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`.
2023-06-29Improve error handling for custom listsJonathan1-0/+20
Create different errors for missing/already existing list and missing/already existing location within list. Use the details field in gRPC to signal these different cases Make errors prettier when output in the CLI.
2023-05-03Replace error handling in mullvad-cli with anyhowDavid Lönnhager1-2/+2
2023-05-03And gRPC interface wrapper and refactor CLI to use clap derive instead of ↵David Lönnhager1-0/+40
the builder
2021-11-09Close management interface server when all broadcasters are closedDavid Lönnhager1-11/+13
2021-07-13Update tonic and prostDavid Lönnhager1-1/+7
2021-07-13Fix AsyncRead and AsyncWrite implementationsDavid Lönnhager1-6/+6
2021-04-29Implement From for AppVersionInfo, ConnectionConfig, andDavid Lönnhager1-5/+1
TransportProtocol
2021-04-08Simplify setting of socket permissionsDavid Lönnhager1-12/+8
2021-04-08Set group of management socket using MULLVAD_MANAGEMENT_SOCKET_GROUPDavid Lönnhager1-7/+33
2021-03-25Use mandatory key rotation interval with limited rangeDavid Lönnhager1-1/+1
2021-01-14Remove explicit assignment of DACLs to named pipesDavid Lönnhager1-6/+0
2020-08-20Add mullvad-management-interface crate for IPC types and functionsDavid Lönnhager1-0/+123