summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src/device
AgeCommit message (Collapse)AuthorFilesLines
2025-07-15Run `crago +nightly clippy --fix`Markus Pettersson1-18/+19
2025-07-10Run `cargo fmt`Sebastian Holmin3-7/+7
2025-05-06Fix lifetime changes in rust 2024Markus Pettersson1-25/+64
2025-02-12Format workspaceSebastian Holmin3-7/+7
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 Holmin3-35/+41
2025-02-12Fix "RPIT lifetime capture rules"Sebastian Holmin1-1/+3
2025-02-12Run `cargo +beta fix --edition`Sebastian Holmin3-19/+19
2024-10-01Rename account "token" to account "number"Joakim Hulthe2-71/+74
2024-09-25Consolidate two mutexes into oneMarkus Pettersson1-8/+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-02-27Replace err_derive with thiserrorJoakim Hulthe1-16/+16
`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-15Swap out `talpid-core` for `talpid-future`Markus Pettersson1-1/+1
2024-02-14Add MullvadApi to MullvadVPNUITetstsEmīls1-2/+2
2024-01-18Update the tunnel state on lockdown mode change.Sebastian Holmin1-1/+1
The printing of lockdown mode by `mullvad status` does not reflect the current setting unless the tunnel state has also been updated.
2024-01-05Run `cargo +nightly fmt`Sebastian Holmin1-2/+1
2023-12-29Fetch account ID from APIDavid Lönnhager2-15/+22
2023-12-12Run device check on every third attempt instead of every otherDavid Lönnhager1-1/+1
2023-12-12Add unit tests for device checkDavid Lönnhager1-32/+196
2023-10-24Remove 'ResponseFailure' device error variantDavid Lönnhager1-43/+26
2023-10-19Fold all access token requests into a single requestDavid Lönnhager1-6/+6
2023-10-16Add android conditional compilation for google payJonathan3-76/+102
Add conditional compilation for google pay API access for only android. Also allow new error type to be parsed. Additionally fix review comments, formatting and warnings.
2023-10-16Add piping for google play payment API requestsJonathan3-3/+216
This commit adds all of the basic piping in order to let Android use the JNI interface in order to make requests to our API pertaining to google play payment initialization and status.
2023-09-19Simplify immediate retry strategyDavid Lönnhager1-33/+22
2023-09-19Define retry strategy constantsDavid Lönnhager1-29/+12
2023-09-05Remove forwarded port from devices in Rust codeLinus Färnstrand1-6/+1
2023-08-07Get rid of "extern crate serde" and import derive macros explicitlyLinus Färnstrand1-3/+3
2023-04-03Set retry interval to 24 hours for automatic key rotationDavid Lönnhager1-1/+5
2023-03-30Account manager now always rotates key if neededJonathan1-6/+6
Previously the account manager would not rotate the wireguard key unless any account manager command was given. This resulted in old keys not being rotated sometimes when not using the GUI. This fixes this by always starting a key rotation when the account manager starts.
2022-09-13Move expiry event to separate enumDavid Lönnhager1-29/+34
2022-09-13Log whether account has time leftDavid Lönnhager1-0/+6
2022-09-13Fix mapping of daemon voucher errors to gRPC errorsDavid Lönnhager2-0/+6
2022-09-13Implement correctly cancellable voucher submissions in the account managerDavid Lönnhager3-5/+95
2022-09-13Enter or leave error state when account runs out of time or has timeDavid Lönnhager1-2/+9
added
2022-09-13Emit expiry event when account validity is checkedDavid Lönnhager1-0/+8
2022-09-13Give invalidate_current_data a more specific nameDavid Lönnhager1-7/+7
2022-09-13Add expiry check to the account managerDavid Lönnhager3-4/+86
2022-09-13Allow for within-daemon-only device eventsDavid Lönnhager1-13/+17
2022-09-07Reset device check counter in error state to ensure that the deviceDavid Lönnhager1-1/+3
validity check is made when reconnecting from that state
2022-09-07Fix unlikely overflow due to reconnectDavid Lönnhager1-1/+1
2022-08-29Fix Clippy errorsDavid Lönnhager1-4/+4
2022-06-21Fix the large majority of clippy warningsJonathan1-8/+5
This commit fixes most of the remaining clippy warnings in the codebase. These warnings were the more semantically difficult ones to fix. There are some warnings that remain from the rebase that will be fixed in the upcoming PR.
2022-06-13Perform a clippy --fixjonathan1-8/+5
This is a giant commit which performs only a clippy --fix. Auditing can happen in two ways, either by reading every line or by running a `cargo clippy --fix` on the previous commit and make sure that the result is the same.
2022-05-30Improve error message for device broadcast errorDavid Lönnhager1-1/+1
2022-05-25Simplify device removal eventDavid Lönnhager1-22/+3
2022-05-25Save 'created' and 'hijack_dns' fields in device structsDavid Lönnhager2-0/+21
2022-05-12Update RPCs to handle device states and event variantsDavid Lönnhager1-17/+28
2022-05-12Overwrite device.json if deserialization failsDavid Lönnhager1-7/+14
2022-05-12Remove pointless async blockDavid Lönnhager1-2/+1
2022-05-12Distinguish between logged-out and revoked device statesDavid Lönnhager1-50/+103
2022-05-11Don't stop device check if an API request is abortedDavid Lönnhager1-2/+18