Skip to content
Permalink
Browse files

Merge pull request #174 from Jigsaw-Code/bemasc-update

Bump dependency versions to latest
  • Loading branch information...
bemasc committed May 10, 2019
2 parents ca90954 + 819af3f commit 860d16a5eb97886b93fefce8e843281b886b51d0
Showing with 5,267 additions and 383 deletions.
  1. +10 −5 Android/app/build.gradle
  2. BIN Android/app/libs/guava-27.1-android.jar
  3. BIN Android/app/libs/okhttp-3.11.0.jar
  4. BIN Android/app/libs/okhttp-3.12.3.jar
  5. +1 −1 Android/app/src/main/AndroidManifest.xml
  6. +3 −3 Android/app/src/main/java/app/intra/net/dns/DnsUdpQuery.java
  7. +5 −5 Android/app/src/main/java/app/intra/net/doh/Resolver.java
  8. +2 −2 Android/app/src/main/java/app/intra/net/socks/SocksVpnAdapter.java
  9. +21 −22 Android/app/src/main/java/app/intra/net/split/SplitVpnAdapter.java
  10. +4 −4 Android/app/src/main/java/app/intra/sys/AutoStarter.java
  11. +12 −12 Android/app/src/main/java/app/intra/sys/IntraVpnService.java
  12. +3 −3 Android/app/src/main/java/app/intra/sys/LogWrapper.java
  13. +3 −3 Android/app/src/main/java/app/intra/sys/PersistentState.java
  14. +5 −5 Android/app/src/main/java/app/intra/ui/MainActivity.java
  15. +2 −2 Android/app/src/main/java/app/intra/ui/RecyclerAdapter.java
  16. +2 −2 Android/app/src/main/java/app/intra/ui/settings/SettingsFragment.java
  17. +8 −3 Android/build.gradle
  18. +196 −0 Android/firebase-repo/com/google/auto/auto-parent/6/auto-parent-6.pom
  19. BIN ...oid/firebase-repo/com/google/auto/value/auto-value-annotations/1.6/auto-value-annotations-1.6.jar
  20. +75 −0 ...oid/firebase-repo/com/google/auto/value/auto-value-annotations/1.6/auto-value-annotations-1.6.pom
  21. +49 −0 Android/firebase-repo/com/google/auto/value/auto-value-parent/1.6/auto-value-parent-1.6.pom
  22. BIN Android/firebase-repo/org/checkerframework/checker-qual/2.5.2/checker-qual-2.5.2.jar
  23. +65 −0 Android/firebase-repo/org/checkerframework/checker-qual/2.5.2/checker-qual-2.5.2.pom
  24. BIN Android/gradle-plugin-repo/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
  25. +0 −23 Android/gradle-plugin-repo/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.pom
  26. BIN Android/gradle-plugin-repo/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0.jar
  27. +0 −152 Android/gradle-plugin-repo/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0.pom
  28. BIN Android/gradle-plugin-repo/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar
  29. +135 −0 Android/gradle-plugin-repo/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.pom
  30. BIN ...ugin-repo/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18.jar
  31. BIN ...plugin-repo/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar
  32. +10 −3 ...annotations/{2.0.18/error_prone_annotations-2.0.18.pom → 2.1.3/error_prone_annotations-2.1.3.pom}
  33. +7 −5 ...ne/error_prone_parent/{2.0.18/error_prone_parent-2.0.18.pom → 2.1.3/error_prone_parent-2.1.3.pom}
  34. +37 −27 ...o/com/google/guava/guava-parent/{23.0/guava-parent-23.0.pom → 26.0-jre/guava-parent-26.0-jre.pom}
  35. BIN Android/gradle-plugin-repo/com/google/guava/guava/23.0/guava-23.0.jar
  36. BIN Android/gradle-plugin-repo/com/google/guava/guava/26.0-jre/guava-26.0-jre.jar
  37. +49 −16 ...oid/gradle-plugin-repo/com/google/guava/guava/{23.0/guava-23.0.pom → 26.0-jre/guava-26.0-jre.pom}
  38. BIN ...plugin-repo/commons-codec/commons-codec/{1.9/commons-codec-1.9.jar → 1.10/commons-codec-1.10.jar}
  39. +11 −8 ...plugin-repo/commons-codec/commons-codec/{1.9/commons-codec-1.9.pom → 1.10/commons-codec-1.10.pom}
  40. +411 −0 Android/gradle-plugin-repo/org/apache/apache/15/apache-15.pom
  41. +416 −0 Android/gradle-plugin-repo/org/apache/apache/18/apache-18.pom
  42. +1,437 −0 Android/gradle-plugin-repo/org/apache/commons/commons-parent/35/commons-parent-35.pom
  43. BIN Android/gradle-plugin-repo/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar
  44. BIN Android/gradle-plugin-repo/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6.jar
  45. +11 −4 ...po/org/apache/httpcomponents/httpclient/{4.5.2/httpclient-4.5.2.pom → 4.5.6/httpclient-4.5.6.pom}
  46. +16 −20 ...components-client/{4.5.2/httpcomponents-client-4.5.2.pom → 4.5.6/httpcomponents-client-4.5.6.pom}
  47. +23 −11 ...httpcomponents-core/{4.4.5/httpcomponents-core-4.4.5.pom → 4.4.10/httpcomponents-core-4.4.10.pom}
  48. +993 −0 ...radle-plugin-repo/org/apache/httpcomponents/httpcomponents-parent/10/httpcomponents-parent-10.pom
  49. BIN Android/gradle-plugin-repo/org/apache/httpcomponents/httpcore/4.4.10/httpcore-4.4.10.jar
  50. +13 −21 ...n-repo/org/apache/httpcomponents/httpcore/{4.4.5/httpcore-4.4.5.pom → 4.4.10/httpcore-4.4.10.pom}
  51. BIN Android/gradle-plugin-repo/org/apache/httpcomponents/httpcore/4.4.5/httpcore-4.4.5.jar
  52. BIN Android/gradle-plugin-repo/org/apache/httpcomponents/httpmime/4.5.2/httpmime-4.5.2.jar
  53. BIN Android/gradle-plugin-repo/org/apache/httpcomponents/httpmime/4.5.6/httpmime-4.5.6.jar
  54. +20 −4 ...gin-repo/org/apache/httpcomponents/httpmime/{4.5.2/httpmime-4.5.2.pom → 4.5.6/httpmime-4.5.6.pom}
  55. BIN Android/gradle-plugin-repo/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar
  56. +790 −0 Android/gradle-plugin-repo/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.pom
  57. BIN Android/gradle-plugin-repo/org/jetbrains/kotlin/kotlin-reflect/1.2.0/kotlin-reflect-1.2.0.jar
  58. BIN Android/gradle-plugin-repo/org/jetbrains/kotlin/kotlin-reflect/1.3.21/kotlin-reflect-1.3.21.jar
  59. +2 −2 ...tbrains/kotlin/kotlin-reflect/{1.2.0/kotlin-reflect-1.2.0.pom → 1.3.21/kotlin-reflect-1.3.21.pom}
  60. BIN ...adle-plugin-repo/org/jetbrains/kotlin/kotlin-stdlib-common/1.2.71/kotlin-stdlib-common-1.2.71.jar
  61. BIN ...adle-plugin-repo/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.21/kotlin-stdlib-common-1.3.21.jar
  62. +3 −3 ...n-stdlib-common/{1.2.71/kotlin-stdlib-common-1.2.71.pom → 1.3.21/kotlin-stdlib-common-1.3.21.pom}
  63. BIN ...d/gradle-plugin-repo/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71.jar
  64. BIN ...d/gradle-plugin-repo/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.3.21/kotlin-stdlib-jdk7-1.3.21.jar
  65. +3 −3 .../kotlin-stdlib-jdk7/{1.2.71/kotlin-stdlib-jdk7-1.2.71.pom → 1.3.21/kotlin-stdlib-jdk7-1.3.21.pom}
  66. BIN ...d/gradle-plugin-repo/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.2.71/kotlin-stdlib-jdk8-1.2.71.jar
  67. BIN ...d/gradle-plugin-repo/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.21/kotlin-stdlib-jdk8-1.3.21.jar
  68. +4 −4 .../kotlin-stdlib-jdk8/{1.2.71/kotlin-stdlib-jdk8-1.2.71.pom → 1.3.21/kotlin-stdlib-jdk8-1.3.21.pom}
  69. BIN Android/gradle-plugin-repo/org/jetbrains/kotlin/kotlin-stdlib/1.2.71/kotlin-stdlib-1.2.71.jar
  70. BIN Android/gradle-plugin-repo/org/jetbrains/kotlin/kotlin-stdlib/1.3.21/kotlin-stdlib-1.3.21.jar
  71. +3 −3 ...etbrains/kotlin/kotlin-stdlib/{1.2.71/kotlin-stdlib-1.2.71.pom → 1.3.21/kotlin-stdlib-1.3.21.pom}
  72. BIN Android/gradle-plugin-repo/org/ow2/asm/asm/7.0/asm-7.0.jar
  73. +96 −0 Android/gradle-plugin-repo/org/ow2/asm/asm/7.0/asm-7.0.pom
  74. +309 −0 Android/gradle-plugin-repo/org/ow2/ow2/1.5/ow2-1.5.pom
  75. +2 −2 Android/gradle/wrapper/gradle-wrapper.properties
@@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

// See https://developer.android.com/studio/publish/app-signing#secure-shared-keystore
def keystorePropertiesFile = rootProject.file("keystore.properties")
@@ -46,6 +47,10 @@ android {
debug {
pseudoLocalesEnabled true
resValue("bool", "FIREBASE_ENABLED", "false")
// Split build across multiple dex files. This is necessary mostly because Guava adds
// so many classes that we exceed the dex limit (65536 methods). This does not apply
// to release builds, where unused classes are pruned.
multiDexEnabled true
}
}
testOptions {
@@ -81,9 +86,9 @@ repositories {
dependencies {
// Third-party dependency: OkHttp3
implementation fileTree(include: [
'okhttp-3.11.0.jar',
'okhttp-3.12.3.jar', // 3.12.* has branched to support API <21. 3.13+ doesn't.
'okio-1.15.0.jar',
'guava-26.0-android.jar'
'guava-27.1-android.jar'
], dir: 'libs')

// Third-party test dependencies.
@@ -101,9 +106,9 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
// For Firebase Analytics, etc.
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-perf:16.2.3'
implementation 'com.google.firebase:firebase-crash:16.2.1'
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-perf:16.2.5' // Last version to support API <17
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.0'
// For Sockslib
implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'org.slf4j:slf4j-android:1.7.25'
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -40,7 +40,7 @@
</receiver>

<meta-data
android:name="firebase_crash_collection_enabled"
android:name="firebase_crashlytics_collection_enabled"
android:value="@bool/FIREBASE_ENABLED"/>
<meta-data
android:name="firebase_analytics_collection_enabled"
@@ -18,7 +18,7 @@
import android.os.SystemClock;
import android.util.Log;
import app.intra.sys.LogWrapper;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import java.net.InetAddress;
import java.net.ProtocolException;

@@ -49,14 +49,14 @@ public static DnsUdpQuery fromUdpBody(byte[] dnsPacketData) {
return null;
}
if (!dnsPacket.isNormalQuery() && !dnsPacket.isResponse()) {
FirebaseCrash.logcat(Log.INFO, LOG_TAG, "Dropping strange DNS query");
Crashlytics.log(Log.INFO, LOG_TAG, "Dropping strange DNS query");
return null;
}

dnsUdpQuery.type = dnsPacket.getQueryType();
dnsUdpQuery.name = dnsPacket.getQueryName();
if (dnsUdpQuery.name == null || dnsUdpQuery.type == 0) {
FirebaseCrash.logcat(Log.INFO, LOG_TAG, "No question in DNS packet");
Crashlytics.log(Log.INFO, LOG_TAG, "No question in DNS packet");
return null;
}
dnsUdpQuery.requestId = dnsPacket.getId();
@@ -18,7 +18,7 @@
import android.util.Log;
import app.intra.net.dns.DnsUdpQuery;
import app.intra.sys.LogWrapper;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import java.io.IOException;
import java.net.SocketTimeoutException;
import java.nio.BufferOverflowException;
@@ -95,11 +95,11 @@ public void onFailure(Call call, IOException e) {
Transaction.Status.CANCELED : Transaction.Status.SEND_FAIL;
LogWrapper.logcat(Log.WARN, LOG_TAG, "Failed to read HTTPS response: " + e.toString());
if (e instanceof SocketTimeoutException) {
FirebaseCrash.logcat(Log.WARN, LOG_TAG, "Workaround for OkHttp3 #3146: resetting");
Crashlytics.log(Log.WARN, LOG_TAG, "Workaround for OkHttp3 #3146: resetting");
try {
serverConnection.reset();
} catch (NullPointerException npe) {
FirebaseCrash.logcat(Log.WARN, LOG_TAG,
Crashlytics.log(Log.WARN, LOG_TAG,
"Unlikely race: Null server connection at reset.");
}
}
@@ -123,15 +123,15 @@ private void processResponse(Response response) {
try {
writeRequestIdToDnsResponse(dnsResponse, dnsUdpQuery.requestId);
} catch (BufferOverflowException e) {
FirebaseCrash.logcat(Log.WARN, LOG_TAG, "ID replacement failed");
Crashlytics.log(Log.WARN, LOG_TAG, "ID replacement failed");
transaction.status = Transaction.Status.BAD_RESPONSE;
return;
}
DnsUdpQuery parsedDnsResponse = DnsUdpQuery.fromUdpBody(dnsResponse);
if (parsedDnsResponse != null) {
Log.d(LOG_TAG, "RNAME: " + parsedDnsResponse.name + " NAME: " + dnsUdpQuery.name);
if (!dnsUdpQuery.name.equals(parsedDnsResponse.name)) {
FirebaseCrash.logcat(Log.ERROR, LOG_TAG, "Mismatch in request and response names.");
Crashlytics.log(Log.ERROR, LOG_TAG, "Mismatch in request and response names.");
transaction.status = Transaction.Status.BAD_RESPONSE;
return;
}
@@ -23,7 +23,7 @@
import app.intra.net.VpnAdapter;
import app.intra.sys.IntraVpnService;
import app.intra.sys.LogWrapper;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import java.io.IOException;
import java.net.Inet4Address;
import java.net.InetAddress;
@@ -169,7 +169,7 @@ private static ParcelFileDescriptor establishVpn(IntraVpnService vpnService) {
.addDisallowedApplication(vpnService.getPackageName())
.establish();
} catch (Exception e) {
FirebaseCrash.report(e);
Crashlytics.logException(e);
return null;
}
}
@@ -26,7 +26,7 @@
import app.intra.net.doh.ResponseWriter;
import app.intra.net.doh.Transaction;
import app.intra.sys.IntraVpnService;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -96,7 +96,7 @@ private static ParcelFileDescriptor establishVpn(IntraVpnService vpnService) {
PrivateAddress privateIpv6Address = new PrivateAddress(IPV6_SUBNET, 120);
PrivateAddress privateIpv4Address = selectPrivateAddress();
if (privateIpv4Address == null) {
FirebaseCrash.logcat(
Crashlytics.log(
Log.ERROR, LOG_TAG, "Unable to find a private address on which to establish a VPN.");
return null;
}
@@ -122,13 +122,13 @@ private static ParcelFileDescriptor establishVpn(IntraVpnService vpnService) {
}
tunFd = builder.establish();
} catch (IllegalArgumentException e) {
FirebaseCrash.report(e);
Crashlytics.logException(e);
Log.e(LOG_TAG, establishVpnErrorMsg, e);
} catch (SecurityException e) {
FirebaseCrash.report(e);
Crashlytics.logException(e);
Log.e(LOG_TAG, establishVpnErrorMsg, e);
} catch (IllegalStateException e) {
FirebaseCrash.report(e);
Crashlytics.logException(e);
Log.e(LOG_TAG, establishVpnErrorMsg, e);
}

@@ -167,7 +167,7 @@ private static PrivateAddress selectPrivateAddress() {
try {
netInterfaces = Collections.list(NetworkInterface.getNetworkInterfaces());
} catch (SocketException e) {
FirebaseCrash.report(e);
Crashlytics.logException(e);
e.printStackTrace();
return null;
}
@@ -199,12 +199,12 @@ private static PrivateAddress selectPrivateAddress() {
@Override
// This thread reads DNS requests from the VPN interface and forwards them via |serverConnection|.
public void run() {
FirebaseCrash.logcat(Log.DEBUG, LOG_TAG, "Query thread starting");
Crashlytics.log(Log.DEBUG, LOG_TAG, "Query thread starting");
if (tunFd == null) {
// This check is necessary due to a race, where the VPN has been closed and the device regains
// network connectivity before the service stops. As a result the TUN file descriptor is null
// at the time the resolver is created.
FirebaseCrash.logcat(Log.WARN, LOG_TAG, "VPN/TUN file descriptor is null");
Crashlytics.log(Log.WARN, LOG_TAG, "VPN/TUN file descriptor is null");
return;
}

@@ -218,8 +218,8 @@ public void run() {
length = in.read(buffer.array());
} catch (IOException e) {
if (!isInterrupted()) {
FirebaseCrash.logcat(Log.ERROR, LOG_TAG, "Failed to read from tun interface.");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, LOG_TAG, "Failed to read from tun interface.");
Crashlytics.logException(e);
}
return;
}
@@ -233,7 +233,7 @@ public void run() {
continue;
}
if (length < IP_MIN_HEADER_LENGTH) {
FirebaseCrash.logcat(Log.WARN, LOG_TAG, "Received malformed IP packet.");
Crashlytics.log(Log.WARN, LOG_TAG, "Received malformed IP packet.");
continue;
}
buffer.limit(length);
@@ -248,30 +248,29 @@ public void run() {
ipPacket = new Ipv6Packet(buffer);
}
} catch (IllegalArgumentException e) {
FirebaseCrash
.logcat(Log.WARN, LOG_TAG, "Received malformed IP packet: " + e.getMessage());
Crashlytics.log(Log.WARN, LOG_TAG, "Received malformed IP packet: " + e.getMessage());
continue;
}
byte protocol = ipPacket.getProtocol();
if (protocol != UDP_PROTOCOL) {
FirebaseCrash.logcat(Log.WARN, LOG_TAG, getProtocolErrorMessage(protocol));
Crashlytics.log(Log.WARN, LOG_TAG, getProtocolErrorMessage(protocol));
continue;
}

UdpPacket udpPacket = new UdpPacket(ByteBuffer.wrap(ipPacket.getPayload()));
if (udpPacket.destPort != DNS_DEFAULT_PORT) {
FirebaseCrash.logcat(Log.WARN, LOG_TAG, "Received non-DNS UDP packet");
Crashlytics.log(Log.WARN, LOG_TAG, "Received non-DNS UDP packet");
continue;
}

if (udpPacket.length == 0) {
FirebaseCrash.logcat(Log.INFO, LOG_TAG, "Received interrupt UDP packet.");
Crashlytics.log(Log.INFO, LOG_TAG, "Received interrupt UDP packet.");
continue;
}

DnsUdpQuery dnsRequest = DnsUdpQuery.fromUdpBody(udpPacket.data);
if (dnsRequest == null) {
FirebaseCrash.logcat(Log.ERROR, LOG_TAG, "Failed to parse DNS request");
Crashlytics.log(Log.ERROR, LOG_TAG, "Failed to parse DNS request");
continue;
}
Log.d(
@@ -292,8 +291,8 @@ public void run() {
dnsRequest, udpPacket.data, this);
} catch (Exception e) {
if (!isInterrupted()) {
FirebaseCrash.logcat(Log.WARN, LOG_TAG, "Unexpected exception in UDP loop.");
FirebaseCrash.report(e);
Crashlytics.log(Log.WARN, LOG_TAG, "Unexpected exception in UDP loop.");
Crashlytics.logException(e);
}
}
}
@@ -345,8 +344,8 @@ public void sendResult(DnsUdpQuery dnsUdpQuery, Transaction transaction) {
try {
out.write(rawIpResponse);
} catch (IOException e) {
FirebaseCrash.logcat(Log.ERROR, LOG_TAG, "Failed to write to VPN/TUN interface.");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, LOG_TAG, "Failed to write to VPN/TUN interface.");
Crashlytics.logException(e);
transaction.status = Transaction.Status.INTERNAL_ERROR;
}
}
@@ -359,7 +358,7 @@ public void close() {
try {
tunFd.close();
} catch (IOException e) {
FirebaseCrash.report(e);
Crashlytics.logException(e);
}
}
}
@@ -21,7 +21,7 @@
import android.net.VpnService;
import android.util.Log;
import app.intra.ui.MainActivity;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;

/**
* Broadcast receiver that runs on boot, and also when the app is restarted due to an update.
@@ -31,14 +31,14 @@

@Override
public void onReceive(Context context, Intent intent) {
FirebaseCrash.logcat(Log.DEBUG, LOG_TAG, "Boot event");
Crashlytics.log(Log.DEBUG, LOG_TAG, "Boot event");
VpnController controller = VpnController.getInstance();
VpnState state = controller.getState(context);
if (state.activationRequested && !state.on) {
FirebaseCrash.logcat(Log.DEBUG, LOG_TAG, "Autostart enabled");
Crashlytics.log(Log.DEBUG, LOG_TAG, "Autostart enabled");
if (VpnService.prepare(context) != null) {
// prepare() returns a non-null intent if VPN permission has not been granted.
FirebaseCrash.logcat(Log.WARN, LOG_TAG, "VPN permission not granted. Starting UI.");
Crashlytics.log(Log.WARN, LOG_TAG, "VPN permission not granted. Starting UI.");
Intent startIntent = new Intent(context, MainActivity.class);
startIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(startIntent);

0 comments on commit 860d16a

Please sign in to comment.
You can’t perform that action at this time.