summaryrefslogtreecommitdiffhomepage
path: root/mullvad-management-interface/src/client.rs
AgeCommit message (Collapse)AuthorFilesLines
2024-10-07Rename "smart routing" to "direct only" in the APISebastian Holmin1-2/+2
Also invert the behavior
2024-10-01Rename account "token" to account "number"Joakim Hulthe1-9/+9
2024-09-17Align Smart routing GUI with design specJoakim Hulthe1-2/+2
2024-09-17Add daita.enabled and daita.use_anywhere rpc callsJoakim Hulthe1-0/+15
2024-09-06Build wg with daita support for androidAlbin1-1/+1
2024-08-01Implement feature indicators in daemonJoakim Hulthe1-0/+10
- Add a GetFeatureIndicators gRPC call that get's the current set of active "features" that should be shown in the UI. - Extend the TunnelState with a FeatureIndicators value. Clients who listens for TunnelState events will get updates automatically.
2024-07-31Add ResetSettings RPC to the management interfaceDavid Lönnhager1-0/+5
2024-07-26Fix `doc list item missing indentation`Sebastian Holmin1-1/+1
2024-06-25Add `daita` as a Cargo cfg variableMarkus Pettersson1-2/+2
Gate DAITA compilation on `"cargo::rustc-cfg=daita"` emitted in build files per platform.
2024-06-25Enable DAITA for linux in CLI and typesSebastian Holmin1-2/+2
2024-06-20Add `PrepareRestartv2` gRPC callMarkus Pettersson1-0/+14
- Add option to automatically shutdown daemon on after running through the same safety routine as `PrepareRestart`. This is exposed via a new gRPC call called `PrepareRestartV2`. - Add help text for enabling full disk access to the CLI
2024-06-17Get value of data directory value at app startupMarkus Pettersson1-6/+20
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-22Fix broken lints in rustdocsSebastian Holmin1-8/+1
I ran `cargo doc` and fixed as many broken links as I could find.
2024-04-16Add DAITA Windows client and updated tuncfgDavid Lönnhager1-0/+12
2024-04-12Add ClearCustomLists RPC callJoakim Hulthe1-0/+9
2024-04-12Add ClearCustomApiAccessMethods rpc callJoakim Hulthe1-0/+9
2024-04-11Fix wireguard rotation testSebastian Holmin1-2/+2
The test was flaky because if a race condition which made the key rotation missable.
2024-03-20Test leaking TCP/UDP/ICMP packets in split tunnelJoakim Hulthe1-8/+0
2024-03-20Add split tunnel test for windowsJoakim Hulthe1-5/+4
2024-01-31Change API access methods settings formatMarkus Pettersson1-8/+9
Change API access methods settings format to encode that built-in access methods always exist by making them distinct values of the `AccessMethod` settings. This change was also propagated to the corresponding protobuf definition, such that any client may make use of this fact as well. The appropriate settings migration was added.
2024-01-22Add `TestCustomApiAccessMethod` RPC callMarkus Pettersson1-1/+13
Add a new RPC call `TestCustomApiAccessMethod` for testing access methods on the fly, without having to save them to the daemon settings first. This only works for custom access methods.
2024-01-10Add patch export to the management interfaceDavid Lönnhager1-0/+5
2024-01-08Add new internal daemon event `AccessMethodEvent`Markus Pettersson1-0/+6
Add a new `InternalDaemonEvent` for announcing when the current API access method changes.
2023-12-21Remove `GetCurrentLocation`.Sebastian Holmin1-22/+3
Make the daemon send two tunnel state updates, one with out IP being empty, and another with it being filled when am.i.mullvad.net responds. Update CLI for this change. Other front ends are left out.
2023-12-04Perform testing of access methods asynchronouslyMarkus Pettersson1-3/+4
Perform testing of access methods asynchronously in a separate `tokio` task as to not block the daemon from handling other daemon events during the testing window
2023-12-04Move access method testing logic to `mullvad-daemon`Markus Pettersson1-7/+4
Move access method testing logic to `mullvad-daemon`, which means that the implementation details of how the test works is opaque to whatever frontend which wants to issue a test of some (configured) access method.
2023-11-22Obtain tunnel interface from management interface in testsDavid Lönnhager1-0/+4
2023-11-17Add support for applying JSON patches to management interfaceDavid Lönnhager1-0/+5
2023-11-13Add relay override commands to wrapper clientDavid Lönnhager1-1/+20
2023-10-31Replace UpdateRelaySettings with SetRelaySettingsDavid Lönnhager1-4/+4
2023-10-09Add `GetApiAddresses` now returns a list of API addressesMarkus Pettersson1-3/+9
2023-10-09Code cleanupMarkus Pettersson1-18/+0
- Get rid of extraneous calls to `clone` - Address nit: combine similar match arms into a single match arm - Fix `clippy` lint "unused `async` for function with no await statements" - Fix protobuf field numbers should start from 1 - This was not the case for `Socks5Local` & `Shadowsocks` - Refactor code for opening proxy connections - Cut down on duplicated code for setting up a proxied connection in `mullvad-api`. The difference between different connection modes is how they wrap the underlying `TCP` stream. - Remove `enable_access_method` & `disable_access_method` from RPC-client
2023-10-09Add `GetCurrentApiAccessMethod` to show the current API access methodMarkus Pettersson1-0/+11
- Add a new RPC message: `GetCurrentApiAccessMethod`. This message may be used to retrieve the access method which is currently in use by the daemon for connecting to the Mullvad API. - Add `mullvad api-access status` for showing the API access method in use
2023-10-09Code cleanupMarkus Pettersson1-34/+22
- Rename `mullvad_types::api_access.rs` -> `mullvad_types::access_method.rs` - Rename `ApiAccessMethodId` to simply `Id` Prefer to prefix with module name `access_method` to disambiguate use of `Id` instead, like `access_method::Id` - Remove dead code - Remove `AccessMethodSettingsUpdate` - Remove the `retry_attempt` struct field from `ApiConnectionModeProvider`, as it is no longer used for anything. - Fix typos - `GetApiAddressess` is now correctly spelled `GetApiAddresses` (a single trailing "s") - Deprecate the name `ApiAccessMethod` in favor of `AccessMethodSetting` - To decrease the confusion between `AccessMethod` & `ApiAccessMethod`. `AccessMethodSetting` adds some app-specific settings details on top of an `AccessMethod`, which is not too far fetched with the new naming convention. - Refactor proto file - Rename protobuf message `AccessMethodSettingAdd` to `NewAccessMethodSetting` - `AccessMethod` is now its own message - `AccessMethods` is removed - Add `ApiAccessMethodAdd` protobuf message - The `ApiAccessMethodAdd` returns a `UUID` for the . One important change is that new `AccessMethodSetting`s are created in the daemon, rather than in the CLI/other clients. This means that the daemon now has full control over generating new `AccessMethodSetting`s from `AccessMethod`s. - Clean up conversion code to/from `AccessMethod` protobuf types - Simplify `UpdateApiAccessMethod` RPC - Remove the extranous `ApiAccessMethodUpdate` data type - get rid of `ApiAccessMethodUpdate` protobuf message. Use `UUID` of `ApiAccessMethod` to identify which struct to edit. - get rid of `ApiAccessMethodUpdate` struct
2023-10-09Rename `ApiAccessMethod` to `AccessMethodSetting`Markus Pettersson1-5/+8
`ApiAccessMethod` was just an app-centric wrapper around `AccessMethod`.
2023-10-09Code cleanupMarkus Pettersson1-14/+11
- 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-12/+54
- 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-10-09CleanupMarkus Pettersson1-13/+13
- General code cleanup - Fix some typos - Add some doc comments - Address several `TODO` comments - Fix `clippy` warnings - Removed unused dependency `mullvad-api` from `mullvad-cli` - Removed unused dependency `rand` from `mullvad-daemon` - Rename `mullvad proxy` to `mullvad api-access` - Rename `mullvad_types::api_access_method` -> `mullvad_types::access_method` - Remove unused `mullvad api-access edit` arguments - Fix `Display` for `ProxyConfig` printing arguments in the wrong order - Re-phrase `mullvad api-access test` - If the API call failed, point out which tested access method that did not work. - Fix missing `socket_bypass_tx` value for Android - Refactor `ApiAccessMethod` proto definition - Simplify protobuf definitions of `SOCKS5` api access methods - Remove the `Socks5` enum in favor of implementing `Socks5Local` and `Socks5Remote` directly. - Move `enabled` and `name` out of the individual messages and put them next to the `oneof access_method` in `ApiAccessMethod` proto definition - Use derived `PartialEq` and `Hash` from `AccessMethod` - Instead of hand-rolling `Hash` and implementing an ad-hoc version of half of `PartialEq`, these can now be derived and used as one would imaging due to the refactoring wherer `name` and `enabled` was moved out of `AccessMethod` into `ApiAccessMethod`.
2023-10-09Add `mullvad proxy test`Markus Pettersson1-0/+5
For quickly assessing whether an api access method can reach the API or not.
2023-10-09Add `mullvad proxy use`Markus Pettersson1-0/+17
Allow for settings a specific Access Method to use
2023-10-09Add `mullvad api-access enable/disable`Markus Pettersson1-1/+15
Add `mullvad api-access enable/disable`, which allows for toggling API access methods On/Off. Make `ApiConnectionModeProvider` consider status of access method. `ApiConnectionModeProvider` will only be able to return access methods which are enabled, as it will disregard those which are disabled. Add logic to guarantee the invariant that at least one API access method is available for selection by the `ApiConnectionModeProvider`
2023-10-09Code cleanupMarkus Pettersson1-5/+6
- Add a new datastructures for distinguishing between built-in & custom api access methods - Implement `TryFrom` instead of `From` for fallible conversions - Do not panic if a protobuf-message is ill-formatted - Do not allow removal of built-in api access methods - Refactor notification logic in `access_methods.rs` - Rename `mullvad proxy api` to simply `mullvad proxy` - Since there are no other kinds of proxies at the moment, the subcommand `proxy api` does not make much sense. - Remove left-over comments
2023-10-09Add `mullvad proxy api edit` commandMarkus Pettersson1-0/+11
Allow a user to edit an existing custom api proxy method
2023-10-09Add `mullvad proxy api remove` commandMarkus Pettersson1-0/+8
Allow the user to manually remove a custom api proxy.
2023-10-09Add `mullvad proxy add` commandMarkus Pettersson1-0/+22
Add daemon logic for storing custom access methods & allow a user to add a custom socks5 or shadowsocks proxy. Add all the necessary information for establishing Socks5 connections (both using a local Socks-proxy as well as the normal, remote-proxy, use case) and Shadowsocks connections. Add `api_access_settings` to `mullvad-daemon` Naturally, the Protobuf types has to be mirrored on the Rust/daemon side and lots of boilerplate code had to be written to convert between the two.
2023-09-27Refactor custom list implementationDavid Lönnhager1-52/+13
2023-08-31Remove wireguard-nt switchDavid Lönnhager1-9/+0
2023-06-29Cleanup review comments, CI issues and android supportJonathan1-4/+10
Add necessary android support to allow it to not crash due to interface changes. Format the code, remove redundant async functions, fix android issues related to not having to use a Vec to store the custom lists and a string as an id. Fix unit tests.
2023-06-29Improve error handling for custom listsJonathan1-13/+40
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-06-29Add basic features for custom list and file persistenceJonathan1-0/+54
Create the basic features outside of rename for custom lists and route these to the daemon. Persist custom lists in settings. Has basic custom list features done, adds errors. Adds reconnect in the case where a selected custom list is modified.