summaryrefslogtreecommitdiffhomepage
path: root/mullvad-management-interface/src
AgeCommit message (Collapse)AuthorFilesLines
2023-11-06Remove `from_args` constructors for `access_methods` datatypesMarkus Pettersson1-23/+31
In particular, `access_methods::Socks5Local`, `access_methods::Socks5Remote` & `access_methods::Shadowsocks` have got new constructors which are all infallible.
2023-11-06Prefix remote `ip` and `port` with `remote_` in Socks5Local contextsMarkus Pettersson1-14/+19
2023-10-31Replace UpdateRelaySettings with SetRelaySettingsDavid Lönnhager2-176/+5
2023-10-20Relax relay constraints in `test_quantum_resistant_multihop_udp2tcp_tunnel`Markus Pettersson1-0/+6
Loosen up relay constraints in `test_quantum_resistant_multihop_udp2tcp_tunnel`, which makes the test more resilient to changes in the testing environment.
2023-10-13Use optional modifier for optional primitives in protobuf messagesDavid Lönnhager10-214/+106
2023-10-09Add `GetApiAddresses` now returns a list of API addressesMarkus Pettersson2-3/+30
2023-10-09Add authentication with username+password for SOCKS5 access methodMarkus Pettersson1-16/+47
Add the option to authenticate against remote SOCKS5 proxies with a username+password combination. It was an oversight that this was not added from the start.
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 Pettersson5-324/+282
- 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 Pettersson3-28/+28
`ApiAccessMethod` was just an app-centric wrapper around `AccessMethod`.
2023-10-09Code cleanupMarkus Pettersson5-27/+35
- 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 Pettersson3-68/+147
- 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 Pettersson3-189/+143
- 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 naming custom access methodsMarkus Pettersson1-17/+28
Just a bookkeeping feature for the end user
2023-10-09Add `mullvad api-access enable/disable`Markus Pettersson2-26/+75
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-09(De)Serialize uuid for custom API access methodsMarkus Pettersson1-0/+3
2023-10-09Code cleanupMarkus Pettersson3-72/+129
- 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 Pettersson2-0/+30
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 Pettersson4-0/+206
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önnhager5-180/+39
2023-09-20Add social media blocklists to daemon+CLILinus Färnstrand1-0/+2
When infra has deployed these block lists to the relays, this setting will allow blocking social media domains directly with the app
2023-09-11Remove deprecated uses of from_i32David Lönnhager7-84/+75
2023-09-11Fix chrono warningsDavid Lönnhager3-6/+8
2023-09-05Remove forwarded port from devices in Rust codeLinus Färnstrand1-22/+0
2023-08-31Remove wireguard-nt switchDavid Lönnhager2-15/+0
2023-08-30Fix clippy lintsEmīls1-1/+1
2023-08-21Remove `wg_migration_rand_num` field from settingsMarkus Pettersson1-2/+0
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-07-14Remove `x_threshold_wg_default` codeMarkus Pettersson1-2/+0
Since we migrated to using Wireguard as the definitive default VPN, we can stop reading the `x_threshold_wg_default` field from the API and remove all daemon code related to using it
2023-06-29Add settings migration code, refactor and cleanupJonathan1-2/+2
Bump the settings version. Add code for migrating settings to new version since it is now not backwards compatible. Refactor LocationConstraint and related types to be more lean. Cleanup issues and fix formatting. Refactor LocationConstraint and add migration code
2023-06-29Cleanup review comments, CI issues and android supportJonathan3-31/+35
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 listsJonathan2-13/+60
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-29Update changelog, sync naming in .proto update guiJonathan1-4/+4
Updates the changelog, syncs naming to be consistent inside the .proto file with rust in regards to newly added message types for custom lists. Update the gui so that it does not break when using a custom list daemon. However does not let gui actually use custom lists, only has CLI support.
2023-06-29Add basic features for custom list and file persistenceJonathan5-36/+350
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.
2023-06-27Refactor use of deprecated `chrono` timestamp functionMarkus Pettersson3-5/+9
Since `chrono 0.4.23`, the use of `chrono::NaiveDateTime::from_timestamp` is deprecated in favor of `chrono::NaiveDateTime::from_timestamp_opt`, which returns an `Option` instead of panicking if number of seconds is out of range.
2023-05-24Add tunnel interface to output of `mullvad status`Markus Pettersson1-0/+6
Print the name of the tunnel interface when the app is in a connected state and the user requests verbose output by running `mullvad status -v`. To accomplish this, the state machine needs attach more metadata about the tunnel state when transitioning to the `Connected` state than prior to this change.
2023-05-22Add shadowsocks-proxy crateEmīls1-1/+2
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önnhager10-2/+1070
the builder
2023-03-29Remove getters and setters from SettingsPersisterDavid Lönnhager1-1/+1
2023-02-21Make quantum-resistant tunnel optional in mullvad layerDavid Lönnhager2-13/+54
2022-12-22Add conversion to gRPC type for RelaySettingsUpdateDavid Lönnhager1-1/+74
2022-11-29Return structured AuthFailed error in management interfaceDavid Lönnhager1-12/+51
2022-11-07Split up talpid-coreEmīls Piņķis2-0/+4
2022-10-17Split gRPC conversions into submodules analogous to modules in the types cratesDavid Lönnhager11-1973/+2011
2022-10-17Move gRPC conversions to own moduleDavid Lönnhager2-295/+342