diff options
-rw-r--r-- | app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt | 5 | ||||
-rw-r--r-- | changelog.md | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt b/app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt index ac68c9f..af5966e 100644 --- a/app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt +++ b/app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon | 2 | * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon |
3 | * Copyright (C) 2017-2020 Pacien TRAN-GIRARD | 3 | * Copyright (C) 2017-2023 Pacien TRAN-GIRARD |
4 | * | 4 | * |
5 | * This program is free software: you can redistribute it and/or modify | 5 | * This program is free software: you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
@@ -23,6 +23,7 @@ import android.content.Context | |||
23 | import android.content.Intent | 23 | import android.content.Intent |
24 | import android.net.LocalServerSocket | 24 | import android.net.LocalServerSocket |
25 | import android.net.VpnService | 25 | import android.net.VpnService |
26 | import android.os.Build | ||
26 | import android.os.ParcelFileDescriptor | 27 | import android.os.ParcelFileDescriptor |
27 | import androidx.localbroadcastmanager.content.LocalBroadcastManager | 28 | import androidx.localbroadcastmanager.content.LocalBroadcastManager |
28 | import java8.util.concurrent.CompletableFuture | 29 | import java8.util.concurrent.CompletableFuture |
@@ -133,6 +134,8 @@ class TincVpnService : VpnService() { | |||
133 | Builder().setSession(netName) | 134 | Builder().setSession(netName) |
134 | .applyCfg(interfaceCfg) | 135 | .applyCfg(interfaceCfg) |
135 | .also { applyIgnoringException(it::addDisallowedApplication, BuildConfig.APPLICATION_ID) } | 136 | .also { applyIgnoringException(it::addDisallowedApplication, BuildConfig.APPLICATION_ID) } |
137 | // inherit metered property from underlying network | ||
138 | .also { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) it.setMetered(false) } | ||
136 | .establish()!! | 139 | .establish()!! |
137 | } catch (e: IllegalArgumentException) { | 140 | } catch (e: IllegalArgumentException) { |
138 | return reportError(resources.getString(R.string.notification_error_message_network_config_invalid_format, e.defaultMessage()), e, "network-interface") | 141 | return reportError(resources.getString(R.string.notification_error_message_network_config_invalid_format, e.defaultMessage()), e, "network-interface") |
diff --git a/changelog.md b/changelog.md index 845f1bc..859602c 100644 --- a/changelog.md +++ b/changelog.md | |||
@@ -3,6 +3,9 @@ | |||
3 | This file lists notable changes that have been made to the application on each release. | 3 | This file lists notable changes that have been made to the application on each release. |
4 | Releases are tracked and referred to using git tags. | 4 | Releases are tracked and referred to using git tags. |
5 | 5 | ||
6 | ## v0.36 -- 2023-01-09 | ||
7 | - inherit metered network restriction from underlying link (android 10+) | ||
8 | |||
6 | ## v0.35 -- 2023-01-06 | 9 | ## v0.35 -- 2023-01-06 |
7 | - fix app crash when connecting or enabling FTP server (android 12+) | 10 | - fix app crash when connecting or enabling FTP server (android 12+) |
8 | 11 | ||