summaryrefslogtreecommitdiffhomepage
path: root/mullvad-management-interface/src/client.rs
AgeCommit message (Collapse)AuthorFilesLines
2025-11-03Add `mullvad debug rollout` commandMarkus Pettersson1-0/+19
Define `get`, `reroll` and `seed` for quickly inspecting and debugging new app releases.
2025-09-30Rename block_when_disconnected to lockdown_mode in mullvad cratesTobias Järvelöv1-2/+2
2025-09-30Handle errors returned by the update_api_access_methodTobias Järvelöv1-1/+2
2025-09-30Handle errors returned by the add_api_access_methodTobias Järvelöv1-1/+4
2025-09-30Refactor map_custom_list_error to reduce duplicationTobias Järvelöv1-14/+4
2025-09-30Add function to map access method error to user-facing errorTobias Järvelöv1-0/+10
2025-07-09Put the `tonic::Status` in a Box to make the error type smallerSebastian Holmin1-232/+78
2025-06-24Enable support for creating a custom list with locationsJonatan Rhodin1-3/+7
2025-06-09Add `AllowedIps` setting to CLISebastian Holmin1-1/+11
2025-05-28Implement new version check and app downloaderDavid Lönnhager1-4/+4
This also fixes 'latest_beta' being required in the API Co-authored-by: Sebastian Holmin <sebastian.holmin@mullvad.net> Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>
2025-04-04Implement new debug commands: `relay disable` and `relay enable`Markus Pettersson1-0/+11
Add two new `mullvad debug` subcommands: - mullvad debug relay enable <country|city|hostname|openvpn|wireguard> - mullvad debug relay disable <country|city|hostname|openvpn|wireguard> These commands are used to update the state of relays the current relay list. This is useful to mock relays going offline or coming online from an offline state. These new debug commands were conceived during the development of the feature for adding warnings for the upcoming OpenVPN deprecation, as there wasn't a convenient way of mocking this.
2025-02-12Fix "RPIT lifetime capture rules"Sebastian Holmin1-1/+3
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`.