summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src/migrations
AgeCommit message (Collapse)AuthorFilesLines
2025-10-21Add support for multihop entry filters in daemonKalle Lindström3-1/+161
In the upcoming re-design of select location, separate sets of filters can now be picked for the entry and the exit relays. This commit adds support for that in the relay selector. In order to not affect the current behavior of the desktop and Android apps before the new UI is implemented, the entry filters are set to the same as the exit filters when the relay settings are updated via gRPC.
2025-10-03Bump windows-sys version to latestDavid Lönnhager1-3/+4
This also refactors and documents some code
2025-09-30Add v11 settings migrationTobias Järvelöv3-0/+465
- Renames block_when_disconnected to lockdown_mode - Renames API access methods with non-unique names Co-authored-by: Joakim Hulthe <joakim.hulthe@mullvad.net>
2025-07-22Remove comment about v9 settings migration still being openLinus Färnstrand1-2/+0
2025-07-22Remove #[allow(unused_variables)] from settings migrationLinus Färnstrand1-1/+0
2025-07-22Remove unused code from settings migrationLinus Färnstrand2-66/+0
2025-07-15Allow some unused structsMarkus Pettersson2-0/+2
Do not modify closed migration code.
2025-07-15Run `cargo fmt`Markus Pettersson1-7/+6
2025-07-15Run `crago +nightly clippy --fix`Markus Pettersson4-57/+53
2025-07-10Run `cargo fmt`Sebastian Holmin4-10/+9
2025-04-10Fix some compilation errors on macOS for Rust 2024David Lönnhager1-1/+1
2025-03-07Test that running migrations results in the most recent settings versionDavid Lönnhager3-41/+50
2025-03-07Simplify tests and improve coverageSebastian Holmin1-451/+68
2025-03-07Add tunnel protocol migration to new v10Sebastian Holmin2-0/+557
2025-03-07Remove tunnel protocol migration from v9Sebastian Holmin1-56/+3
2025-03-05Add test for v9 tunnel type migrationDavid Lönnhager1-49/+285
Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>
2025-03-05Migrate settings for tunnel typeDavid Lönnhager1-0/+63
Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>
2025-02-25Refactor unsafe slightly in mullvad_daemon::migrationsJoakim Hulthe1-12/+32
2025-02-12Format workspaceSebastian Holmin4-8/+8
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 Holmin5-16/+19
2025-02-12Run `cargo +beta fix --edition`Sebastian Holmin1-3/+3
2024-11-28Fix clippy warningsMarkus Pettersson1-1/+1
2024-10-01Rename account "token" to account "number"Joakim Hulthe3-22/+22
2024-09-02Run `cargo +nightly clippy --fix`Markus Pettersson1-4/+2
2024-08-27Use std LazyLock instead of once_cell LazyDavid Lönnhager1-3/+2
2024-06-24Run `cargo +nightly fmt`Sebastian Holmin2-13/+17
2024-06-03Fix v9 migration testDavid Lönnhager1-236/+1
2024-05-29Migrate to gRPCDavid Göransson2-3/+698
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-25Update windows-sysJoakim Hulthe1-3/+2
2024-04-22Fix broken lints in rustdocsSebastian Holmin1-1/+1
I ran `cargo doc` and fixed as many broken links as I could find.
2024-03-27Refactor `mullvad-relay-selector`Markus Pettersson4-4/+4
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-28Tweak migrations template fn versions_matchesJoakim Hulthe1-2/+1
Make it not take a mut ref to the json value
2024-02-28Fix migrations/v6.rs docsJoakim Hulthe1-6/+3
2024-02-28Migrate settings to v9Joakim Hulthe2-0/+304
- Change `selected_obfuscation` default to `auto`. - Migrate `selected_obfuscation` from `off` to `auto` for existing users.
2024-02-27Replace err_derive with thiserrorJoakim Hulthe1-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-05Test whether the default settings use the correct versionDavid Lönnhager1-15/+47
2024-01-31Change API access methods settings formatMarkus Pettersson1-27/+286
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-12Validate SOCKS5 credentialsMarkus Pettersson1-4/+3
Validate SOCKS credentials by checking that both `username` and `password` both have a length between 1 and 255 bytes. Link to RFC detailing SOCKS5 username/password authentication: https://datatracker.ietf.org/doc/html/rfc1929
2024-01-05Run `cargo +nightly fmt`Sebastian Holmin1-2/+2
2024-01-05Run `cargo clippy --all-targets --fix`Sebastian Holmin1-2/+0
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 proxiesJonathan2-0/+997
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.
2024-01-02Fix clippy lintsDavid Lönnhager2-6/+6
2023-11-13Remove unnecessary `mut`Sebastian Holmin6-7/+7
2023-09-11Remove TODO about adding features we don't needDavid Lönnhager1-2/+0
2023-08-30Fix clippy lintsEmīls6-6/+6
2023-08-07Get rid of "extern crate serde" and import derive macros explicitlyLinus Färnstrand5-0/+5
2023-08-04Replace all use of `lazy_static` with `once_cell`Markus Pettersson1-3/+2
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-08-01Replace unmaintained dirs-next with maintained dirsLinus Färnstrand1-1/+1
Gets rid of one usage of winapi in our dependency tree
2023-06-29Add settings migration code, refactor and cleanupJonathan1-8/+295
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-04-26Fix remaining clippy warningsDavid Lönnhager2-5/+4