summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src
AgeCommit message (Collapse)AuthorFilesLines
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öransson7-73/+831
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 Hulthe1-3/+2
2024-04-23Add tests for version checkerDavid Lönnhager1-167/+355
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 Hulthe17-229/+218
`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
2024-02-19Fix build error due to missing importMarkus Pettersson1-1/+1
2024-02-19Move responsibility of updating the API IP from REST handle to the daemonDavid Lönnhager2-1/+63
2024-02-16Refactor API access methodsDavid Lönnhager3-245/+201
2024-02-15Add `force_direct` flag to API overrideMarkus Pettersson1-6/+3
2024-02-15Swap out `talpid-core` for `talpid-future`Markus Pettersson3-8/+7
2024-02-15Fix off-by-one error when choosing access method candidatesMarkus Pettersson3-39/+36
2024-02-14Add MullvadApi to MullvadVPNUITetstsEmīls1-2/+2
2024-02-09Detect available IP versionsMarkus Pettersson1-7/+17
Try to detect available IP versions by looking at the available routes on the host. On Linux, we check if there exists IPv4 and/or IPv6 routes to some public IP addresses. On macOS and Windows, we check if there exists default routes for IPv4 and/or IPv6. On Android, we check if there is any connectivity at all. The intention is to be able to generate better default constraints for tunnel endpoints. If we can detect "working" IPv4 and/or IPv6 and forward this information to a `TunnelParametersGenerator`, we may choose to connect to a Wireguard relay using IPv6 as part of our retry-strategy. This has not been possible before.
2024-02-05Test whether the default settings use the correct versionDavid Lönnhager1-15/+47
2024-01-31Adapt Electron frontend to new access method settings formatMarkus Pettersson1-8/+0
2024-01-31If the current access method is disabled or removed, select the next availableMarkus Pettersson3-151/+98
If the current access method is disabled, select the next available access method from the daemon settings.