forked from core/mobile_nebula
Fix crash on Android 9 and below (#81)
This commit is contained in:
parent
552d16bce2
commit
5ec6004a9f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue