Compare commits

...

4 Commits

Author SHA1 Message Date
Jason A. Donenfeld 2ce51c8c2e version: bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-24 15:36:50 +01:00
Jason A. Donenfeld c621ec0c50 GoBackend: restrict APIs to proper version
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-24 15:36:27 +01:00
Harsh Shandilya 2ed2a1431d Upgrade to Gradle 6.1
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-01-24 09:57:25 +05:30
Harsh Shandilya 3a425394ca GoBackend: Ensure we're unmetered on API 29 as well
VPN apps targetting Android 10 are treated as metered by default.

Source: https://developer.android.com/reference/android/net/VpnService.Builder.html#setMetered(boolean)

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-01-24 09:51:48 +05:30
5 changed files with 10 additions and 5 deletions
+2 -2
View File
@@ -17,8 +17,8 @@ android {
applicationId 'com.wireguard.android'
minSdkVersion 21
targetSdkVersion 29
versionCode 462
versionName '0.0.20200123'
versionCode 463
versionName '0.0.20200124'
buildConfigField 'int', 'MIN_SDK_VERSION', "$minSdkVersion.apiLevel"
}
// If the keystore file exists
@@ -8,6 +8,7 @@ package com.wireguard.android.backend;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.ParcelFileDescriptor;
import androidx.annotation.Nullable;
import androidx.collection.ArraySet;
@@ -212,6 +213,11 @@ public final class GoBackend implements Backend {
builder.setMtu(config.getInterface().getMtu().orElse(1280));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
builder.setMetered(false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
service.setUnderlyingNetworks(null);
builder.setBlocking(true);
try (final ParcelFileDescriptor tun = builder.establish()) {
if (tun == null)
@@ -224,7 +230,6 @@ public final class GoBackend implements Backend {
currentTunnel = tunnel;
service.setUnderlyingNetworks(null);
service.protect(wgGetSocketV4(currentTunnelHandle));
service.protect(wgGetSocketV6(currentTunnelHandle));
} else {
+1 -1
View File
@@ -21,7 +21,7 @@ task clean(type: Delete) {
tasks {
wrapper {
gradleVersion = "6.0.1"
gradleVersion = "6.1"
distributionType = Wrapper.DistributionType.ALL
}
}
Binary file not shown.
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists