summaryrefslogtreecommitdiffhomepage
path: root/mullvad-jni/src
AgeCommit message (Collapse)AuthorFilesLines
2025-10-15Enable the user to include their account token in problem reportsJonatan Rhodin1-0/+7
2025-07-10Run `cargo fmt`Sebastian Holmin3-9/+9
2025-05-21Supply IP address when using API overrideDavid Göransson1-17/+21
Previously we did a DNS lookup for Stagemole and Devmole however, this causes problem when starting the app with no internet and is different from how the app performs in production mode. This commit removes that logic in order to align closer to what we expect in prod.
2025-05-06Run `cargo fix --edition`Markus Pettersson1-1/+1
2025-04-03Add product flavor to in app logsKalle Lindström2-0/+5
2025-03-25Avoid using an unavailable ip version to connect to a relayJonatan Rhodin1-1/+3
Co-authored-by: Sebastian Holmin <sebastian.holmin@mullvad.net>
2025-03-07Track IPv6 connectivity on AndroidDavid Lönnhager1-0/+2
Co-authored-by: Jonatan Rhoidn <jonatan.rhodin@mullvad.net> Co-authored-by: David Göransson <david.goransson@mullvad.net>
2025-02-24Set exception logging file on AndroidJoakim Hulthe1-4/+11
2025-02-12Replace `#[no_mangle]` with `#[unsafe(no_mangle)]`Sebastian Holmin2-4/+4
2025-02-06Replace old waitForTunnelUp functionDavid Göransson3-188/+13
After invoking VpnService.establish() we will get a tunnel file descriptor that corresponds to the interface that was created. However, this has no guarantee of the routing table beeing up to date, and we might thus send traffic outside the tunnel. Previously this was done through looking at the tunFd to see that traffic is sent to verify that the routing table has changed. If no traffic is seen some traffic is induced to a random IP address to ensure traffic can be seen. This new implementation is slower but won't risk sending UDP traffic to a random public address at the internet.
2025-01-02Change how daemon is startedEmīls1-31/+15
2025-01-02Remove global API endpointEmīls3-12/+19
2024-11-27Handle legacy always-on vpn profilesDavid Göransson1-1/+3
Co-authored-by: Jonatan Rhodin <jonatan.rhodin@mullvad.net>
2024-11-22Add comment about tokio runtime and getaddrinfoDavid Lönnhager1-0/+3
2024-08-30Initialize mullvad daemon directly in vpn service on createJonatan Rhodin2-79/+72
As a consequence move the address resolve to the daemon
2024-08-13Refactor tunnel provider and TalpidVpnServiceDavid Lönnhager1-19/+4
This also fixes the issue of the VPN service being restarted unnecessarily
2024-08-12Fix apparently incorrect codeDavid Lönnhager1-2/+2
2024-08-12Refactor TalpidVpnService in mullvad-jniDavid Lönnhager1-28/+33
2024-08-07Fix shutdown issue on AndroidMarkus Pettersson1-0/+3
The daemon never received the shutdown event, causing it to never actually triggering a shutdown. This was fixed by actually using the correct `DaemonCommandChannel` to send the shutdown event.
2024-08-06Shut down gRPC server gracefullyMarkus Pettersson1-14/+2
This commit also removes the `EventListener` trait and the daemon is no longer parameterized over it.
2024-06-24Remove unused HashSet from preloaded Java classesDavid Lönnhager1-1/+0
2024-06-24Remove unused IsNull traitDavid Lönnhager2-19/+0
2024-06-24Refactor daemon init and deinit on AndroidDavid Lönnhager3-416/+257
2024-06-17Get value of data directory value at app startupMarkus Pettersson1-14/+25
Remove `APP_PATH` from `mullvad-paths` on Android since it should not be a constant value. Instead, it is passed down from the Android app startup. As it turns out, it is really ever used for pointing to the RPC socket in use.
2024-05-29Migrate to gRPCDavid Göransson4-2007/+54
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-09Use single-threaded runtime when launching serviceDavid Lönnhager1-2/+2
2024-04-03Enable single-use-lifetimes rustc lintLinus Färnstrand1-2/+2
Removes superfluous lifetime definitions. Simplifying the code
2024-03-19Implement JNI support for Server IP overridesDavid Göransson3-4/+185
2024-03-14Return success or error when creating and updating a custom listJonatan Rhodin2-15/+76
2024-02-27Replace err_derive with thiserrorJoakim Hulthe4-43/+39
`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-08Add support for custom lists in jniJonatan Rhodin3-0/+103
2024-01-11Synchronize `mullvad-api` and `mullvad-daemon` when the `api-override`Markus Pettersson1-10/+4
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-08Add new internal daemon event `AccessMethodEvent`Markus Pettersson1-0/+6
Add a new `InternalDaemonEvent` for announcing when the current API access method changes.
2024-01-04Rename Android enum variants to conform to lint rulesLinus Färnstrand3-16/+14
2024-01-04Add workspace level lintsLinus Färnstrand1-1/+0
2023-12-21Support new tunnel state API in the Android frontend.David Göransson2-36/+0
Remove `get_current_location` from jni.
2023-12-21Handle am.i.mullvad.net with internal daemon eventSebastian Holmin1-1/+0
Add `geoip::GeoIpHandler`, which sends an `InternalDaemonEvent::LocationEvent` when the location arrives. It also handles aborting in-flight requests and retries.
2023-11-17Add missing FirewallPolicyError classJonatan Rhodin1-0/+1
2023-10-31Replace UpdateRelaySettings with SetRelaySettingsDavid Lönnhager3-10/+7
2023-10-25Add providers model and enable it in the daemonJonatan Rhodin1-0/+2
2023-10-23Add relay ownership enum to relay constraintsJonatan Rhodin1-0/+1
2023-10-16Add android conditional compilation for google payJonathan1-2/+2
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 play purchasing modelsJonatan Rhodin1-0/+5
2023-10-16Add piping for google play payment API requestsJonathan2-2/+134
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-26Convert voucher errors correctly in mullvad-jniDavid Lönnhager1-6/+6
2023-06-29Cleanup review comments, CI issues and android supportJonathan1-3/+7
Add necessary android support to allow it to not crash due to interface changes. Format the code, remove redundant async functions, fix android issues related to not having to use a Vec to store the custom lists and a string as an id. Fix unit tests.
2023-06-28Expose wireguard port ranges to the android appJonatan Rhodin1-0/+2
2023-06-28Update rust and java code to expose wireguard port settingsJonatan Rhodin1-0/+2
- Add converters for wireguard constraint to and from java - Add java clas for wireguard constraint - Add code to set wireguard port
2023-06-07Add android support for quantum tunneling in the daemonJonatan Rhodin3-0/+41
2023-05-24Make get_daemon_interface unsafe and document itLinus Färnstrand1-50/+87