summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src/device/mod.rs
AgeCommit message (Collapse)AuthorFilesLines
2025-07-15Run `crago +nightly clippy --fix`Markus Pettersson1-18/+19
2025-07-10Run `cargo fmt`Sebastian Holmin1-3/+3
2025-02-12Format workspaceSebastian Holmin1-3/+3
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-15/+26
2025-02-12Run `cargo +beta fix --edition`Sebastian Holmin1-10/+10
2024-10-01Rename account "token" to account "number"Joakim Hulthe1-27/+32
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-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önnhager1-2/+9
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-16Add android conditional compilation for google payJonathan1-70/+85
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 requestsJonathan1-1/+122
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-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-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önnhager1-0/+4
2022-09-13Implement correctly cancellable voucher submissions in the account managerDavid Lönnhager1-1/+65
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önnhager1-4/+70
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-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-25Save 'created' and 'hijack_dns' fields in device structsDavid Lönnhager1-0/+19
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
2022-05-11Validate device more oftenEmīls1-1/+1
2022-05-10Log WireGuard key rotationDavid Lönnhager1-0/+3
2022-05-10Return initial device when spawning the account managerDavid Lönnhager1-3/+5
2022-05-10Initialize account manager event listener in constructorDavid Lönnhager1-17/+4
2022-05-10Refactor device removal out of daemon structDavid Lönnhager1-0/+1
2022-05-09Decouple tunnel parameters generation from daemon message handlerDavid Lönnhager1-1/+1
2022-05-05Hide private device type in `mullvad-daemon`David Lönnhager1-75/+156
2022-05-05Fix regression in device validationDavid Lönnhager1-6/+6
2022-05-05Add back logging for device validity checkDavid Lönnhager1-0/+8
2022-05-05Do not store pubkey in device.jsonDavid Lönnhager1-3/+2
2022-05-05Simplify panicDavid Lönnhager1-7/+6