Prepare for release 0.5.9 (#68)

Updated the yggdrasil-go submodule. Fixed #64, updated some deps.
This commit is contained in:
Revertron 2024-10-23 18:10:01 +02:00 committed by GitHub
parent 34756b2193
commit cdc12a8e7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 22 additions and 12 deletions

View file

@ -9,9 +9,9 @@ android {
defaultConfig { defaultConfig {
applicationId "eu.neilalexander.yggdrasil" applicationId "eu.neilalexander.yggdrasil"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 33 targetSdkVersion 34
versionCode 18 versionCode 19
versionName "0.1-018" versionName "0.1-019"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
@ -51,12 +51,12 @@ android {
dependencies { dependencies {
implementation fileTree(include: ['*.aar'], dir: 'libs') implementation fileTree(include: ['*.aar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.12.0' implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.5.0' implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.preference:preference-ktx:1.2.1' implementation 'androidx.preference:preference-ktx:1.2.1'
testImplementation 'junit:junit:4.+' testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
} }

View file

@ -6,6 +6,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED" />
<application <application
android:name=".GlobalApplication" android:name=".GlobalApplication"
@ -42,6 +43,7 @@
<service <service
android:name=".PacketTunnelProvider" android:name=".PacketTunnelProvider"
android:permission="android.permission.BIND_VPN_SERVICE" android:permission="android.permission.BIND_VPN_SERVICE"
android:foregroundServiceType="systemExempted"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.net.VpnService" /> <action android:name="android.net.VpnService" />

View file

@ -68,6 +68,7 @@ class MainActivity : AppCompatActivity() {
startVpnActivity.launch(vpnIntent) startVpnActivity.launch(vpnIntent)
} else { } else {
start() start()
enabledSwitch.isEnabled = false
} }
} }
false -> { false -> {
@ -181,6 +182,9 @@ class MainActivity : AppCompatActivity() {
else -> getString(R.string.main_many_peers, count) else -> getString(R.string.main_many_peers, count)
} }
} }
if (!enabledSwitch.isEnabled) {
enabledSwitch.isEnabled = true
}
} }
} }
} }

View file

@ -232,7 +232,11 @@ open class PacketTunnelProvider: VpnService() {
} }
private fun updater() { private fun updater() {
try {
Thread.sleep(500) Thread.sleep(500)
} catch (_: InterruptedException) {
return
}
var lastStateUpdate = System.currentTimeMillis() var lastStateUpdate = System.currentTimeMillis()
updates@ while (started.get()) { updates@ while (started.get()) {
val treeJSON = yggdrasil.treeJSON val treeJSON = yggdrasil.treeJSON

View file

@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.9.10' ext.kotlin_version = '1.9.20'
repositories { repositories {
google() google()
mavenCentral() mavenCentral()

@ -1 +1 @@
Subproject commit 947b6ad7aa93eb2174bf16ddac844c7afaf2677d Subproject commit 0b9c8bd020f971847604e7e1f0e0cfc66e65da49