summaryrefslogtreecommitdiffhomepage
path: root/mullvad-jni/src/lib.rs
AgeCommit message (Collapse)AuthorFilesLines
2025-07-10Run `cargo fmt`Sebastian Holmin1-5/+5
2025-05-06Run `cargo fix --edition`Markus Pettersson1-1/+1
2025-04-03Add product flavor to in app logsKalle Lindström1-0/+4
2025-02-24Set exception logging file on AndroidJoakim Hulthe1-4/+11
2025-02-12Replace `#[no_mangle]` with `#[unsafe(no_mangle)]`Sebastian Holmin1-2/+2
2025-02-06Replace old waitForTunnelUp functionDavid Göransson1-6/+10
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īls1-1/+12
2024-11-22Add comment about tokio runtime and getaddrinfoDavid Lönnhager1-0/+3
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 IsNull traitDavid Lönnhager1-1/+0
2024-06-24Refactor daemon init and deinit on AndroidDavid Lönnhager1-403/+154
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öransson1-1167/+43
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-03-19Implement JNI support for Server IP overridesDavid Göransson1-2/+138
2024-03-14Return success or error when creating and updating a custom listJonatan Rhodin1-15/+73
2024-02-27Replace err_derive with thiserrorJoakim Hulthe1-12/+11
`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 Rhodin1-0/+70
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-04Rename Android enum variants to conform to lint rulesLinus Färnstrand1-4/+4
2024-01-04Add workspace level lintsLinus Färnstrand1-1/+0
2023-12-21Support new tunnel state API in the Android frontend.David Göransson1-28/+0
Remove `get_current_location` from jni.
2023-10-31Replace UpdateRelaySettings with SetRelaySettingsDavid Lönnhager1-4/+4
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 piping for google play payment API requestsJonathan1-1/+113
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-07Add android support for quantum tunneling in the daemonJonatan Rhodin1-0/+23
2023-05-24Make get_daemon_interface unsafe and document itLinus Färnstrand1-50/+87
2023-05-24Fix warnings pointed out by ClippyLinus Färnstrand1-16/+13
2023-05-09Propagate udp2tcp settings between app and daemonCubxity1-0/+22
Co-authored-by: Albin <albin@mullvad.net> Co-authored-by: David Lönnhager <david.l@mullvad.net> Co-authored-by: Odd Stranne <odd@mullvad.net>
2023-03-01If set, override the API hostname from the InetSocketAddressDavid Lönnhager1-0/+27
2022-11-28Conditionally compile some API override fieldsDavid Lönnhager1-16/+23
2022-11-28Make API address overridable from MullvadDaemonDavid Lönnhager1-1/+101
2022-03-31Add update_device to Android interfaceDavid Lönnhager1-0/+17
2022-03-23Rename mullvad-rpc to mullvad-apiDavid Lönnhager1-3/+3
2022-03-14Update Rust-end JNI and Android IPCDavid Lönnhager1-66/+159
2022-03-01Drop in-flight REST requests implicitlyDavid Lönnhager1-1/+1
2021-11-29Reformat code without blank_lines_upper_bound = 2Linus Färnstrand1-1/+0
2021-07-13Fix tokio runtime buildersDavid Lönnhager1-1/+1
2021-06-18Update account history RPCsDavid Lönnhager1-16/+5
2021-04-23Use new error enum. in `VoucherSubmissionResult`Janito Vaqueiro Ferreira Filho1-14/+3
2021-04-23Create `VoucherSubmissionError` enumerationJanito Vaqueiro Ferreira Filho1-0/+25
2021-01-12Replace the old cache directoryDavid Lönnhager1-1/+0
2021-01-04Always prefer the last used API addressDavid Lönnhager1-0/+1
2020-12-14Move problem report JNI methods to a new moduleJanito Vaqueiro Ferreira Filho1-64/+2
2020-12-04Implement `MullvadDaemon.setDnsOptions` methodJanito Vaqueiro Ferreira Filho1-1/+26
2020-11-26Don't return `null` from `getAccountData`Janito Vaqueiro Ferreira Filho1-1/+1
2020-11-24Log when daemon starts even if logging is set-upJanito Vaqueiro Ferreira Filho1-1/+2