summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src/settings
AgeCommit message (Collapse)AuthorFilesLines
2025-10-07Define networks as const valuesMarkus Pettersson1-0/+2
2025-09-30Rename block_when_disconnected to lockdown_mode in mullvad cratesTobias Järvelöv1-4/+4
2025-09-30Add convert fn from access_method error to management_interface statusTobias Järvelöv1-0/+19
2025-09-25Add reset-settings command to CLIDavid Lönnhager1-1/+1
2025-08-14Set relay to current country on first startKalle Lindström1-0/+7
Sets the default relay selection to the current country (as determined by am.i.mullvad.net). If the current country does not have any relays the country with the closest relay is choosen instead. In non-release builds of the Android app we do not bundle a relay list in the APK, and the relay list is fetched when the user logs in. So one of the following can happen: 1. Geolocation request returns, we have a relay list. 2. Geolocation request returns, we do not yet have a relay list. 3. Relay list request returns, we have a geolocation. 4. Relay list request returns, we do not have a geolocation. In 1. and 3. we can update the default location. In 2. we have to wait until the relay list is fetched from the api until we can update the default location. 4. is unlikely to happen but could happen if am.i.mullvad is down.
2025-07-15Run `crago +nightly clippy --fix`Markus Pettersson1-7/+5
2025-07-10Implement recents support in daemonKalle Lindström1-2/+39
2025-07-10Run `cargo fmt`Sebastian Holmin1-5/+1
2025-06-09Add `AllowedIps` setting to CLISebastian Holmin1-3/+7
2025-05-22Add read-only settings loaderDavid Lönnhager1-13/+25
2025-03-24Make it possible to disable IPv6 in the tunnelJonatan Rhodin1-4/+0
2025-03-05Migrate settings for tunnel typeDavid Lönnhager1-3/+1
Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>
2025-02-12Format workspaceSebastian Holmin1-1/+5
The 2024 edition contains new formatting rules. All of these are not compatible with the 2021 formatting style, but most of them are. To change the formatting to be as close to the new style as possible while remaining compatible with the 2021 edition, I first ran `cargo +beta fmt` with the edition set to 2024, then, with the edition set to 2021, I ran `cargo fmt`.
2025-02-12Fix `clippy::precedence`Sebastian Holmin1-10/+5
2025-02-12Remove `ref` bindingsSebastian Holmin1-2/+2
2025-02-12Run `cargo +beta fix --edition`Sebastian Holmin2-7/+7
2025-01-22Avoid cloning settingsMarkus Pettersson1-0/+4
2024-10-29Remove `block_when_disconnected` setting on AndroidMarkus Pettersson1-11/+9
2024-10-16Set block_when_disconnected to always be false on androidJonatan Rhodin1-1/+8
2024-10-01Rename account "token" to account "number"Joakim Hulthe1-1/+1
2024-09-26Disable daemon auto-start setting on AndroidJoakim Hulthe1-0/+3
2024-07-31Add ResetSettings RPC to the management interfaceDavid Lönnhager1-2/+0
2024-06-24Refactor daemon init and deinit on AndroidDavid Lönnhager1-2/+5
2024-06-24Run `cargo +nightly fmt`Sebastian Holmin1-1/+1
2024-05-29Migrate to gRPCDavid Göransson2-5/+0
Co-authored-by: Jonatan Rhodin <jonatan.rhodin@mullvad.net> Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net> Co-authored-by: David Lönnhager <david.l@mullvad.net>
2024-04-18Limit the size of custom list names to 30 graphemesEmīls1-1/+36
2024-04-03Enable single-use-lifetimes rustc lintLinus Färnstrand1-2/+2
Removes superfluous lifetime definitions. Simplifying the code
2024-03-27Refactor `mullvad-relay-selector`Markus Pettersson1-8/+5
Implement a system built on 'queries' for selecting appropriate relays. A query is a set of constraints which dictates which relay(s) that *can* be chosen by the relay selector. The user's settings can naturally be expressed as a query. The semantics of merging two queries in a way that always prefer user settings is defined by the new `Intersection` trait. Split `mullvad-relay-selector` into several modules: - `query.rs`: Definition of a query on different types of relays. This module is integral to the new API of `mullvad-relay-selector` - `matcher.rs`: Logic for filtering out candidate relays based on a query. - `detailer.rs`: Logic for deriving connection details for the selected relay. - `tests/`: Integration tests for the new relay selector. These tests only use the public APIs of `RelaySelector` and make sure that the output matches the expected output in different scenarios.
2024-02-27Replace err_derive with thiserrorJoakim Hulthe2-30/+28
`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.
2024-02-19Fix redundant importsDavid Lönnhager1-1/+0
2024-01-31Allow fallible settings update functionsMarkus Pettersson1-6/+73
Implement `SettingsPersister.try_update`, which allow the caller to signal a failed settings update, hindering a bad settings update from being applied.
2024-01-10Link to patch spec in patch moduleDavid Lönnhager1-0/+3
2024-01-10Add unit test for export functionDavid Lönnhager1-0/+19
2024-01-10Add patch export to the management interfaceDavid Lönnhager1-1/+40
2024-01-08Add unit test that loads valid patch fileDavid Lönnhager1-7/+24
2024-01-05Run `cargo clippy --all-targets --fix`Sebastian Holmin1-1/+1
These lints where missed because the problems were inside tests. Note that "targets" does not refer to OS/architectures. ``` > cargo build --help ... Target Selection: --lib Build only this package's library --bins Build all binaries --bin [<NAME>] Build only the specified binary --examples Build all examples --example [<NAME>] Build only the specified example --tests Build all test targets --test [<NAME>] Build only the specified test target --benches Build all bench targets --bench [<NAME>] Build only the specified bench target --all-targets Build all targets ```
2024-01-03Allow app to use custom socks5 and shadwosocks proxiesJonathan1-1/+11
This PR has a couple of different purposes - Allow users to use socks5 local proxies with the CLI without having to be root nor use split-tunneling. This only works for OpenVPN. - Unify the types used by different proxy parts of the codebase, such as the Access Methods as well as some already existing OpenVPN proxy code. This PR changes the firewall on all desktop platforms as well as changes the routing table slightly on MacOS and Windows. On Linux the firewall code is modified to apply the appropriate firewall marks to all packages that go to a remote endpoint corresponding to the remote part of a local socks5 proxy. The firewall marks will allow the routing to be done without having to modify the routing table. On MacOS and Windows the routing table is modified to allow packages to go to that same endpoint to pass outside the VPN tunnel, it will additionally punch a hole in the firewall. The PR also migrates the settings file from version 7 to version 8 in order to properly and neatly unify Proxy related types. Finally it provides some slight extensions to the gRPC interface in order to allow for control over the custom proxy settings.
2023-12-12Add unit tests for deserializing missing or invalid settingsMarkus Pettersson1-1/+62
2023-12-12Refactor reading of settingsMarkus Pettersson1-37/+70
Separate concerns of `SettingsPersister`'s error recovery and the deserialization of `Settings` from file.
2023-11-23Fix uncaught clippy warnings and a typo.Sebastian Holmin1-17/+17
2023-11-17Add support for applying JSON patches to management interfaceDavid Lönnhager2-0/+35
2023-11-17Add settings patcher to mullvad-daemonDavid Lönnhager2-0/+907