summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src/geoip.rs
AgeCommit message (Collapse)AuthorFilesLines
2025-07-10Run `cargo fmt`Sebastian Holmin1-1/+1
2024-10-16Replace occurrences of old `Body` type in `rest` modSebastian Holmin1-1/+1
Use `Empty<Bytes>` for outgoing, `Incoming` for responses and generic paras for our type wrapping `Request`.
2024-08-27Use std LazyLock instead of once_cell LazyDavid Lönnhager1-2/+2
2024-02-19Fix redundant importsDavid Lönnhager1-4/+1
2024-02-15Swap out `talpid-core` for `talpid-future`Markus Pettersson1-4/+2
2024-01-04Remove debug logging for geoipDavid Lönnhager1-1/+0
2023-12-21Handle am.i.mullvad.net with internal daemon eventSebastian Holmin1-7/+59
Add `geoip::GeoIpHandler`, which sends an `InternalDaemonEvent::LocationEvent` when the location arrives. It also handles aborting in-flight requests and retries.
2023-12-21Remove `GetCurrentLocation`.Sebastian Holmin1-10/+3
Make the daemon send two tunnel state updates, one with out IP being empty, and another with it being filled when am.i.mullvad.net responds. Update CLI for this change. Other front ends are left out.
2023-12-21Change to exponential retry delaySebastian Holmin1-5/+5
2023-11-28Add retry for `GetCurrentLocation`Sebastian Holmin1-1/+33
2023-10-30Newtype REST ResponseDavid Lönnhager1-2/+1
2023-10-30Rename RestRequest to RequestDavid Lönnhager1-1/+1
2023-10-23Improve error handling for API requests that failed to due being offlineDavid Lönnhager1-20/+4
2023-10-19Fold all access token requests into a single requestDavid Lönnhager1-1/+2
2023-08-04Replace all use of `lazy_static` with `once_cell`Markus Pettersson1-18/+17
To align more with the upcoming standardizations within the Rust ecosystem which started with the release of `1.70.0` and the inevitable deprecation of `lazy_static`.
2023-05-26Allow dev builds to override location checking endpointMarkus Pettersson1-9/+36
If `mullvad-daemon` was built with the `api-override` feature flag, the new environment variable `MULLVAD_CONNCHECK_HOST` may be used to supply a different hostname for the location checking endpoint than the standard `am.i.mullvad.net`. It is equivalent to replacing `curl https://ipv4.am.i.mullvad.net/json` with `curl https://ipv4.{$MULLVAD_LOCATION_HOST}/json` Note that this change applies to both IPv4 and IPv6 endpoints. Log warning if `MULLVAD_CONNCHECK_HOST` is used in release builds. The variable will have no effect if `mullvad-daemon` was built in release mode, but it is good to let the user know this if he/she thinks otherwise.
2023-01-30Run `cargo clippy --fix` with the new Rust 1.67 preferred formatLinus Färnstrand1-1/+1
2022-09-30Stop IPv6 requestsEmīls Piņķis1-6/+15
Stop sending IPv6 geolocation requests if IPv6 is disabled.
2022-03-23Rename mullvad-rpc to mullvad-apiDavid Lönnhager1-3/+3
2021-04-06Only log interesting network errorsEmīls1-9/+28
2021-04-06Import RPC errorEmīls1-5/+5
2020-12-07Log entire error chain in geoipDavid Lönnhager1-3/+10
2020-09-07Use new-style futures for geoip requestsDavid Lönnhager1-39/+36
2020-06-25Parse version info to check if version is too newEmīls1-1/+1
2020-04-27Use HTTP RPCs in daemonEmīls1-52/+36
2019-10-17Upgrade err-derive to 0.2.1Linus Färnstrand1-2/+2
2019-04-08Update mullvad-daemon::geoip module to not use error-chainLinus Färnstrand1-12/+21
2019-04-08Getting rid of error-chain in mullvad-rpcLinus Färnstrand1-3/+1
2019-03-26Send two GeoIP lookups, one over each IPvLinus Färnstrand1-3/+32
2018-10-16Include known exit IP address in current locationJanito Vaqueiro Ferreira Filho1-4/+4
2018-07-05Use bundled CALinus Färnstrand1-2/+3
2018-01-15Download geoip data from am.i.mullvad on requestLinus Färnstrand1-0/+32