diff options
| author | Markus Pettersson <markus.pettersson@mullvad.net> | 2024-01-09 10:41:08 +0100 |
|---|---|---|
| committer | Markus Pettersson <markus.pettersson@mullvad.net> | 2024-01-11 09:18:26 +0100 |
| commit | 8b0fd0d971e67df8415da1bdac558e366bfd7290 (patch) | |
| tree | e6b51f09eb39ca4a343c9d21880accb2903122f3 /android/lib/endpoint/src | |
| parent | 75eb89c820f12d488a76934f59ba29fe999cf59c (diff) | |
| download | mullvadvpn-8b0fd0d971e67df8415da1bdac558e366bfd7290.tar.xz mullvadvpn-8b0fd0d971e67df8415da1bdac558e366bfd7290.zip | |
Synchronize `mullvad-api` and `mullvad-daemon` when the `api-override`
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.
Diffstat (limited to 'android/lib/endpoint/src')
2 files changed, 3 insertions, 6 deletions
diff --git a/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/ApiEndpoint.kt b/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/ApiEndpoint.kt index 7325e3f61b..4b5beacf49 100644 --- a/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/ApiEndpoint.kt +++ b/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/ApiEndpoint.kt @@ -8,6 +8,5 @@ import kotlinx.parcelize.Parcelize data class ApiEndpoint( val address: InetSocketAddress, val disableAddressCache: Boolean, - val disableTls: Boolean, - val forceDirectConnection: Boolean + val disableTls: Boolean ) : Parcelable diff --git a/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/CustomApiEndpointConfiguration.kt b/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/CustomApiEndpointConfiguration.kt index 5790f8c73f..b1559be777 100644 --- a/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/CustomApiEndpointConfiguration.kt +++ b/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/CustomApiEndpointConfiguration.kt @@ -10,14 +10,12 @@ data class CustomApiEndpointConfiguration( val hostname: String, val port: Int, val disableAddressCache: Boolean = true, - val disableTls: Boolean = false, - val forceDirectConnection: Boolean = true + val disableTls: Boolean = false ) : ApiEndpointConfiguration { override fun apiEndpoint() = ApiEndpoint( address = InetSocketAddress(hostname, port), disableAddressCache = disableAddressCache, - disableTls = disableTls, - forceDirectConnection = forceDirectConnection + disableTls = disableTls ) } |
