Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade WireGuard #284

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- name: Install liboqs dependencies
run: sudo apt-get update && sudo apt-get install -y astyle cmake gcc ninja-build libssl-dev python3-pytest python3-pytest-xdist unzip xsltproc doxygen graphviz python3-yaml valgrind

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: gradle

Expand Down
33 changes: 2 additions & 31 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
- name: Checkout submodules
run: git submodule update --init --recursive

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: gradle

Expand All @@ -53,32 +53,3 @@ jobs:
uses: github/codeql-action/analyze@v2
with:
category: "/language:Java"

analyze_go:
name: Analyze Go
runs-on: ubuntu-latest

permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: go

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:Go"
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.6.20'
ext.kotlin_version = '1.8.0'
ext.kotlin_coroutines_version = '1.2.1'
ext.nav_version = '2.3.5'
ext.compose_version = '1.2.0-alpha08'
ext.dagger_version = '2.42'
ext.nav_version = '2.5.0'
ext.compose_version = '1.4.1'
ext.dagger_version = '2.44'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath 'com.android.tools.build:gradle:8.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
}
Expand Down Expand Up @@ -40,6 +40,6 @@ ext {
powerMockito = '1.6.2'
hamcrestVersion = '2.1'
espressoCore = '3.0.1'
lifecycleVersion = '2.3.1'
lifecycleVersion = '2.4.1'
coroutenes = '1.5.2'
}
1 change: 0 additions & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cmake_minimum_required (VERSION 3.4.1)
project(IVPN)

add_subdirectory(tools)
add_subdirectory(src/main/cpp)
50 changes: 27 additions & 23 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'com.android.library'

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'

apply plugin: "androidx.navigation.safeargs.kotlin"

Expand All @@ -14,6 +13,8 @@ if (new File("keystore.properties").exists()) {
}

android {
namespace "net.ivpn.core"

signingConfigs {
release {
keyAlias keystoreProperties['release.key.alias']
Expand Down Expand Up @@ -61,9 +62,11 @@ android {
debuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
matchingFallbacks = ["release"]
}
debug {
signingConfig signingConfigs.debug
matchingFallbacks = ["debug"]
}
}
lintOptions {
Expand All @@ -81,11 +84,12 @@ android {
enabled = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
coreLibraryDesugaringEnabled = true
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
jvmTarget = JavaVersion.VERSION_17
}
testOptions {
execution 'ANDROIDX_TEST_ORCHESTRATOR'
Expand All @@ -97,14 +101,6 @@ android {
path 'CMakeLists.txt'
}
}
androidExtensions {
experimental = true
}

dexOptions {
incremental true
javaMaxHeapSize "4g"
}

splits {
abi {
Expand Down Expand Up @@ -228,37 +224,37 @@ dependencies {
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'

//Used to support stream API from JAVA8 and JAVA9
//ToDo remove it in future
// Used to support stream API from JAVA8 and JAVA9
// ToDo remove it in future
implementation "net.sourceforge.streamsupport:android-retrofuture:$streamsupportVersion"
implementation "net.sourceforge.streamsupport:android-retrostreams:$streamsupportVersion"

//Sliding up panel
// Sliding up panel
implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0"

//Constraint layout
// Constraint layout
implementation "androidx.constraintlayout:constraintlayout:2.0.4"

// QR support
// QR support
implementation 'com.google.zxing:core:3.3.0'
implementation 'com.journeyapps:zxing-android-embedded:4.1.0@aar'

//Encrypted shared preference
// Encrypted shared preference
implementation "androidx.security:security-crypto:1.1.0-alpha03"

//Powerful library for logging
// Powerful library for logging
implementation 'org.slf4j:slf4j-api:1.7.24'
implementation 'org.slf4j:jul-to-slf4j:1.7.0'
implementation 'com.github.tony19:logback-android:2.0.0'

//Navigation component
// Navigation component
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"

//LiveData component
// LiveData component
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$rootProject.lifecycleVersion"

//Coroutines
// Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutenes"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutenes"

Expand All @@ -272,7 +268,7 @@ dependencies {
testImplementation 'org.powermock:powermock-module-junit4-rule:1.6.2'
testImplementation 'org.powermock:powermock-module-junit4:1.6.2'

//Dagger
// Dagger
kapt "com.google.dagger:dagger-compiler:$dagger_version"
implementation "com.google.dagger:dagger:$dagger_version"
annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"
Expand All @@ -284,6 +280,14 @@ dependencies {

// liboqs
implementation project(path: ':liboqs-android')

// For crash logging.
implementation 'io.sentry:sentry-android:4.3.0'
implementation "androidx.multidex:multidex:2.0.1"

// WireGuard
implementation "com.wireguard.android:tunnel:1.0.20230706"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import androidx.databinding.BindingAdapter
import net.ivpn.core.common.views.IPSelectorView
import net.ivpn.core.v2.viewmodel.LocationViewModel

@BindingAdapter("app:ipstate")
@BindingAdapter("ipstate")
fun setState(view: IPSelectorView, state: LocationViewModel.IPState) {
view.setState(state)
}

@BindingAdapter("app:ipStateListener")
@BindingAdapter("ipStateListener")
fun setStateListener(view: IPSelectorView, listener: LocationViewModel.OnIPStateChangedListener?) {
view.setStateListener(listener)
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,6 @@ import net.ivpn.core.v2.splittunneling.items.ApplicationItem
import java.io.File
import java.io.IOException

@BindingAdapter("android:src")
fun setImageUri(view: ImageView, imageUri: String?) {
if (imageUri == null) {
view.setImageURI(null)
} else {
view.setImageURI(Uri.parse(imageUri))
}
}

@BindingAdapter("android:src")
fun setImageUri(view: ImageView, imageUri: Uri?) {
view.setImageURI(imageUri)
}

@BindingAdapter("android:src")
fun setImageDrawable(view: ImageView, drawable: Drawable?) {
view.setImageDrawable(drawable)
Expand Down
6 changes: 2 additions & 4 deletions core/src/main/java/net/ivpn/core/common/pinger/PingDataSet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package net.ivpn.core.common.pinger
*/

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import androidx.lifecycle.map
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
Expand All @@ -40,9 +40,7 @@ class PingDataSet @Inject constructor(
) {

val pings: MutableLiveData<MutableMap<Server, PingResultFormatter?>> = MutableLiveData()
val fastestServer = Transformations.map(pings) {
calculateFastestServer(it)
}
val fastestServer = pings.map { calculateFastestServer(it) }

private var _pings: MutableMap<Server, PingResultFormatter?> = mutableMapOf()

Expand Down
30 changes: 0 additions & 30 deletions core/tools/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion core/tools/libwg-go/.gitignore

This file was deleted.

52 changes: 0 additions & 52 deletions core/tools/libwg-go/Makefile

This file was deleted.

Loading