Merge pull request #96 from amnezia-vpn/android_7_wireguard_fix
Fix: infinite reconnect when using wireguard on Android 7 and 7.1
This commit is contained in:
commit
82f8675b68
2 changed files with 7 additions and 2 deletions
|
@ -48,7 +48,7 @@ dependencies {
|
|||
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.2"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0"
|
||||
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.0.10"
|
||||
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
|
||||
implementation project(path: ':shadowsocks')
|
||||
}
|
||||
|
||||
|
@ -97,6 +97,9 @@ android {
|
|||
}
|
||||
|
||||
compileOptions {
|
||||
// Flag to enable support for the new language APIs
|
||||
coreLibraryDesugaringEnabled true
|
||||
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
|
|
@ -520,7 +520,9 @@ class VPNService : BaseVpnService(), LocalDnsService.Interface {
|
|||
peerBuilder.addAllowedIp(network)
|
||||
}
|
||||
}
|
||||
peerBuilder.setEndpoint(InetEndpoint.parse(peerConfig["Endpoint"]))
|
||||
val endpointConfig = peerConfig["Endpoint"]
|
||||
val endpoint = InetEndpoint.parse(endpointConfig)
|
||||
peerBuilder.setEndpoint(endpoint)
|
||||
peerConfig["PersistentKeepalive"]?.let {
|
||||
peerBuilder.setPersistentKeepalive(it.toInt())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue