summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon
AgeCommit message (Collapse)AuthorFilesLines
2024-06-25Enable DAITA for linux in CLI and typesSebastian Holmin2-6/+6
2024-06-25Print backtrace on caught fault signals (unix)Joakim Hulthe1-0/+5
Useful for debugging nil derefs in linked Go code and whatnot. Co-authored-by: Sebastian Holmin <sebastian.holmin@mullvad.net>
2024-06-24Refactor daemon init and deinit on AndroidDavid Lönnhager4-47/+32
2024-06-24Fix confusing logDavid Lönnhager1-1/+3
2024-06-24Run `cargo +nightly fmt`Sebastian Holmin3-14/+18
2024-06-20Fix on_prepare_restartDavid Lönnhager1-4/+3
2024-06-20Refactor shutdown logicSebastian Holmin1-20/+27
Co-authored-by: David Lönnhager <david.l@mullvad.net>
2024-06-20Remove `DaemonExecutionState` and replace with boolSebastian Holmin1-51/+6
2024-06-20Add `PrepareRestartv2` gRPC callMarkus Pettersson2-7/+23
- 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-20Move UDS cleanup out of DaemonDavid Lönnhager2-10/+5
2024-06-17Get value of data directory value at app startupMarkus Pettersson3-22/+30
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-06-03Fix v9 migration testDavid Lönnhager1-236/+1
2024-05-31Run cargo fmtDavid Lönnhager2-13/+17
2024-05-29Migrate to gRPCDavid Göransson8-75/+832
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-30Add initial split tunneling implementation for macOSDavid Lönnhager2-32/+83
2024-04-25Update windows-sysJoakim Hulthe2-4/+3
2024-04-23Add tests for version checkerDavid Lönnhager2-167/+359
2024-04-23Remove unused DaemonEventSender methodDavid Lönnhager1-12/+0
2024-04-23Remove pointless round trip for version checkDavid Lönnhager2-33/+29
2024-04-23Remove some pointless checksDavid Lönnhager1-15/+2
2024-04-22Fix broken lints in rustdocsSebastian Holmin4-7/+9
I ran `cargo doc` and fixed as many broken links as I could find.
2024-04-18Limit the size of custom list names to 30 graphemesEmīls4-65/+45
2024-04-17Refactor away Daemon::app_version_infoJoakim Hulthe2-50/+43
2024-04-17Do not query latest version unless staleJoakim Hulthe1-37/+56
2024-04-17Make sure to query app verion every 24 hoursJoakim Hulthe2-59/+123
even if the daemon was restarted.
2024-04-16Add DAITA to relay selectionDavid Lönnhager1-1/+3
2024-04-16Add DAITA Windows client and updated tuncfgDavid Lönnhager2-1/+73
2024-04-12Add ClearCustomLists RPC callJoakim Hulthe3-36/+95
2024-04-12Add ClearCustomApiAccessMethods rpc callJoakim Hulthe3-0/+32
2024-04-09Use single-threaded runtime when launching serviceDavid Lönnhager3-11/+24
2024-04-09Initialize logging when running Windows serviceDavid Lönnhager1-1/+1
2024-04-03Enable single-use-lifetimes rustc lintLinus Färnstrand1-2/+2
Removes superfluous lifetime definitions. Simplifying the code
2024-03-28Do not panic when reading public key of relayMarkus Pettersson1-11/+6
Avoid panic when reading public key of relay due to unwrapping an unexpected relay type. The unwrap happened if an OpenVPN relay was selected on Android, which should not happen in the first place.
2024-03-27Exit before dropping tokio runtimeDavid Lönnhager1-11/+12
2024-03-27Refactor `mullvad-relay-selector`Markus Pettersson10-333/+343
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-03-27Warn when running --launch-daemon-status on devJoakim Hulthe2-0/+8
2024-03-27Reset device check counter more seldomMarkus Pettersson1-143/+145
Only reset the device check counter if the daemon successfully connects to a Wireguard relay. Otherwise, the counter is either persisted through multiple tunnel connections (OpenVPN) or incremented on successive failures to connect to a Wireguard relay.
2024-03-21Do uniqueness check when starting windows serviceJoakim Hulthe1-4/+12
2024-03-21Split daemon command flags into dedicated structJoakim Hulthe1-23/+35
2024-03-21Refactor daemon oneshot commandsJoakim Hulthe3-84/+118
2024-03-18Update trust-dns to fix spinning issueDavid Lönnhager1-3/+3
This also fixes the issue of not handling closed sockets gracefully
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 Hulthe18-230/+219
`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-22Do daemon uniqueness check before rotating logsJoakim Hulthe1-9/+11
2024-02-20Move `relay_updater` to `mullvad-daemon`Markus Pettersson3-6/+213
Move `mullvad-relay-selector::relay_updater` to the `mullvad-daemon`. The implications of this is that `mullvad-relay-selector` can drop the dependency on both `mullvad-api` and `tokio`, which brings down the total amount of dependencies when running a simple `Cargo check` from 250+ down to a mere 75. :-)
2024-02-20Get rid of unnecessary settings updatesMarkus Pettersson1-4/+0
Listeners will be notified about the settings changing through `mullvad_daemon::settings::SettingsPersister::update`.
2024-02-20Get rid of unnecessary relay selector updatesMarkus Pettersson1-11/+2
The relay selector will be notified about settings changes already, so there is no need to apply the changes twice.
2024-02-19Fix redundant importsDavid Lönnhager4-8/+1