diff --git a/android/app/src/main/kotlin/net/defined/mobile_nebula/NebulaVpnService.kt b/android/app/src/main/kotlin/net/defined/mobile_nebula/NebulaVpnService.kt index da64c14..75d48d2 100644 --- a/android/app/src/main/kotlin/net/defined/mobile_nebula/NebulaVpnService.kt +++ b/android/app/src/main/kotlin/net/defined/mobile_nebula/NebulaVpnService.kt @@ -92,10 +92,13 @@ class NebulaVpnService : VpnService() { .addRoute(ipNet.network, ipNet.maskSize.toInt()) .setMtu(site!!.mtu) .setSession(TAG) - .setMetered(false) .allowFamily(OsConstants.AF_INET) .allowFamily(OsConstants.AF_INET6); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + builder.setMetered(false); + } + // Add our unsafe routes site!!.unsafeRoutes.forEach { unsafeRoute -> val ipNet = mobileNebula.MobileNebula.parseCIDR(unsafeRoute.route)