summaryrefslogtreecommitdiffhomepage
path: root/mullvad-api/src/lib.rs
AgeCommit message (Collapse)AuthorFilesLines
2025-08-21Add verify play purchase failed loggingKalle Lindström1-2/+9
2025-08-21Fix expected status code for verify play purchaseJonatan Rhodin1-1/+1
2025-07-09Inline format argumentsLinus Färnstrand1-3/+2
2025-07-08Specify lifetime with `use<>` for impl traitSebastian Holmin1-1/+1
2025-06-16Do not rely on DNS for API in installer-downloaderDavid Lönnhager1-28/+8
2025-05-22Migrate legacy storekit payment to Mullvad APIJon Petersson1-0/+15
2025-05-08Add storekit 2 functions to mullvad apiSteffen Ernst1-0/+33
2025-05-06Fix lifetime changes in rust 2024Markus Pettersson1-2/+2
2025-04-24Expose TransportSelector to mullvad-iosJon Petersson1-2/+2
2025-04-23Fix clippy and build errors on macOS for Rust 2024David Lönnhager1-2/+2
2025-04-08Add mullvad api implementation for account proxyJon Petersson1-5/+23
2025-03-25Move version client to module in mullvad-apiDavid Lönnhager1-94/+3
2025-03-25Add feature gate for app version client in mullvad-apiDavid Lönnhager1-0/+3
2025-03-25Add function for fetching version info from new endpoint to mullvad-apiDavid Lönnhager1-0/+48
Co-authored-by: Sebastian Holmin <sebastian.holmin@mullvad.net>
2025-03-17Fix building for Android, rename api to access_mode in mullvad-apiBug Magnet1-1/+1
2025-03-17Move the api client from the daemon to mullvad-apiBug Magnet1-0/+1
2025-02-21Implement an FFI to fetch API IP addresses using mullvad-apiJon Petersson1-2/+7
2025-02-12Fix "RPIT lifetime capture rules"Sebastian Holmin1-6/+8
2025-01-02Remove global API endpointEmīls1-88/+64
2024-12-02Make SNI hostname implicitDavid Lönnhager1-5/+0
2024-12-02Remove DNS fallback except for conncheckDavid Lönnhager1-37/+29
2024-11-26Add missing resolver for iOS testsDavid Lönnhager1-0/+1
2024-11-22Add non-blocking DNS resolver for Android API requestsDavid Lönnhager1-2/+50
2024-10-16Replace occurrences of old `Body` type in `rest` modSebastian Holmin1-2/+1
Use `Empty<Bytes>` for outgoing, `Incoming` for responses and generic paras for our type wrapping `Request`.
2024-10-02Fix bug when overriding API with only MULLVAD_API_HOSTLinus Färnstrand1-0/+1
2024-10-01Rename account "token" to account "number"Joakim Hulthe1-10/+10
2024-09-26Implement `Default` for `ApiAvailibility`Markus Pettersson1-3/+5
2024-09-25Consolidate two mutexes into oneMarkus Pettersson1-4/+4
2024-07-30Ignore obfuscation protocol specific constraints when 'auto' is selectedDavid Lönnhager1-2/+1
2024-07-26Fix `doc list item missing indentation`Sebastian Holmin1-1/+1
2024-06-10Use configured hostname for access tokenEmīls1-3/+3
2024-04-22Fix broken lints in rustdocsSebastian Holmin1-2/+2
I ran `cargo doc` and fixed as many broken links as I could find.
2024-02-27Replace err_derive with thiserrorJoakim Hulthe1-7/+7
`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-19Move responsibility of updating the API IP from REST handle to the daemonDavid Lönnhager1-13/+7
2024-02-16Refactor API access methodsDavid Lönnhager1-16/+9
2024-02-16Only force direct mode by default when overriding the API host/addrDavid Lönnhager1-7/+8
2024-02-15Add `force_direct` flag to API overrideMarkus Pettersson1-21/+46
2024-02-15Fix off-by-one error when choosing access method candidatesMarkus Pettersson1-24/+22
2024-02-15Fix `mullvad-api` build on androidMarkus Pettersson1-3/+1
2024-02-14Add MullvadApi to MullvadVPNUITetstsEmīls1-2/+2
2024-02-14Fix talpid-time for iOS, add FFI for mullvad-apiEmīls1-0/+56
2024-01-16Do not try to resolve API address if `MULLVAD_API_HOST` is not setMarkus Pettersson1-17/+24
If the `api-override` feature is enabled, we allow overriding the ip address to the Mullvad API by settings the `MULLVAD_API_ADDRESS` env variable or have it be resolved automatically if `MULLVAD_API_HOST` is overriden. This commit fixes a bug where we would try to resolve the API address when `MULLVAD_API_ADDRESS` was not set even if `MULLVAD_API_ADDRESS` was not set either.
2024-01-11Synchronize `mullvad-api` and `mullvad-daemon` when the `api-override`Markus Pettersson1-66/+140
feature is enabled Move the logic for using overridden API endpoints for API calls from `mullvad-api::rest` to `mullvad_daemon::api`. This is in line with how the interaction between the two crates work for a normal release build, i.e. when the `api-override` feature is disabled. This commit also removes references to `force_direct_connection` in the Android code. The flag does not exist in the `mullvad-*` rust crates anymore, so it would be erroneous to try to serialize/deserialize the value from the Android client.
2024-01-08Remove `ApiEndpointUpdateHandler`Markus Pettersson1-19/+1
Previously, the `mullvad-api` would tell the `mullvad-daemon` that it wanted a new API endpoint by calling a certain callback (`ApiEndpointUpdateCallback`), which would asynchronously resolve a new API endpoint and tell the daemon to punch an appropriate hole in the firewall for that particular endpoint before the `mullvad-api` crate would consume it. The logic of the callback can be moved inside `AccessModeSelector`, which simplifies the contract between `mullvad-daemon` and `mullvad-api` somewhat.
2024-01-05Run `cargo +nightly fmt`Sebastian Holmin1-1/+1
2024-01-04Add workspace level lintsLinus Färnstrand1-2/+0
2023-12-29Fetch account ID from APIDavid Lönnhager1-11/+4
2023-12-04Perform testing of access methods asynchronouslyMarkus Pettersson1-16/+8
Perform testing of access methods asynchronously in a separate `tokio` task as to not block the daemon from handling other daemon events during the testing window
2023-12-04Move access method testing logic to `mullvad-daemon`Markus Pettersson1-0/+20
Move access method testing logic to `mullvad-daemon`, which means that the implementation details of how the test works is opaque to whatever frontend which wants to issue a test of some (configured) access method.
2023-11-28Add retry for `GetCurrentLocation`Sebastian Holmin1-1/+1