diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 959f4c42..0f58fdd5 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -6,3 +6,13 @@ -dontwarn org.conscrypt.* -dontwarn org.openjsse.javax.net.ssl.* -dontwarn org.openjsse.net.ssl.* + +-keepclassmembers class com.wireguard.android.backend.GoBackend { + ; +} +-keepclassmembers class com.wireguard.android.backend.GoBackend$GhettoCompletableFuture { + ; +} +-keepclassmembers class android.net.VpnService { + ; +} \ No newline at end of file diff --git a/app/src/main/java/nl/eduvpn/app/viewmodel/ServerSelectionViewModel.kt b/app/src/main/java/nl/eduvpn/app/viewmodel/ServerSelectionViewModel.kt index d813bea4..e5e86b23 100644 --- a/app/src/main/java/nl/eduvpn/app/viewmodel/ServerSelectionViewModel.kt +++ b/app/src/main/java/nl/eduvpn/app/viewmodel/ServerSelectionViewModel.kt @@ -75,7 +75,7 @@ class ServerSelectionViewModel @Inject constructor( viewModelScope.launch { var retryCount = 0 while (hasNoMoreServers() && retryCount < 5) { - delay(5_00L) + delay(500L) Log.i(TAG, "No servers found, retrying once more just in case. [$retryCount]") refresh() retryCount++ diff --git a/common/src/main/cpp/jni.cpp b/common/src/main/cpp/jni.cpp index b2826e03..55d79428 100644 --- a/common/src/main/cpp/jni.cpp +++ b/common/src/main/cpp/jni.cpp @@ -107,7 +107,7 @@ void proxyReady() { return; } JNIEnv *env; - __android_log_print(ANDROID_LOG_WARN, "Common-JNI", "ProxyGuard is READY!"); + __android_log_print(ANDROID_LOG_WARN, "Common-JNI", "ProxyGuard is ready!"); bool didAttach = GetJniEnv(globalVM, &env); jfieldID callbackFieldId = env->GetStaticFieldID(globalBackendClass, "callbackFunction","Lorg/eduvpn/common/GoBackend$Callback;"); jobject callbackField = env->GetStaticObjectField(globalBackendClass, callbackFieldId); @@ -222,7 +222,10 @@ extern "C" JNIEXPORT jstring JNICALL Java_org_eduvpn_common_GoBackend_addServer(JNIEnv *env, jobject /* this */, jint serverType, jstring id) { uintptr_t cookie = CookieNew(); const char *id_str = env->GetStringUTFChars(id, nullptr); - SetState(1); // Change first to main state to make sure we are not in a previous state. + if (InState(11).r0 != 0) { + // If we just disconnected, we need to manually set the state back to main + SetState(1); + } char *error = AddServer(cookie, (int)serverType, (char *)id_str, nullptr); CookieDelete(cookie); // Do not delete the cookie, because it might be reused later in the flow diff --git a/ics-openvpn b/ics-openvpn index 9563cc8e..3520bde9 160000 --- a/ics-openvpn +++ b/ics-openvpn @@ -1 +1 @@ -Subproject commit 9563cc8ee33521d7dd00149a2c1de87748b08b80 +Subproject commit 3520bde975dede6d3cd5a65278312b0ecf1014c1