Permalink
Browse files

Rewrite tunnel, proxy, filters

A big rewrite. The goal is to improve tunnel stability and memory management.

All tunnel related state is now managed on one thread without a need for synchronization.
  • Loading branch information...
kar committed Sep 6, 2018
1 parent ab561f2 commit 4be792f057e88f9b9652f193f447c6da4bec6cd5
Showing 537 changed files with 3,496 additions and 2,516 deletions.
@@ -15,6 +15,7 @@ plugins {
}

repositories {
jcenter()
mavenCentral()
maven {
url "https://jitpack.io"
@@ -50,23 +51,59 @@ android {
abortOnError false
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
debug.java.srcDirs += 'src/unofficial/kotlin'
release.java.srcDirs += 'src/official/kotlin'
release.res.srcDirs += 'src/official/res'
release.java.srcDirs += 'src/official-imports/kotlin'
official.java.srcDirs += 'src/official/kotlin'
official.res.srcDirs += 'src/official/res'
official.java.srcDirs += 'src/official-imports/kotlin'
beta.java.srcDirs += 'src/official/kotlin'
beta.res.srcDirs += 'src/official/res'
beta.java.srcDirs += 'src/official-imports/kotlin'
adblockerHome.java.srcDirs += 'src/adblocker/kotlin'
adblockerHome.res.srcDirs += 'src/adblocker/res'
adblockerFdroid.java.srcDirs += 'src/adblocker/kotlin'
adblockerFdroid.res.srcDirs += 'src/adblocker/res'
dnsHome.java.srcDirs += 'src/dns/kotlin'
dnsHome.res.srcDirs += 'src/dns/res'
// Modules do NOT make a runnable app separately
moduleCore.java.srcDirs += 'src/core/kotlin'
testModuleCore.java.srcDirs += 'src/test-core/kotlin'

moduleTunnel.java.srcDirs += 'src/core/kotlin'
moduleTunnel.java.srcDirs += 'src/tunnel/kotlin'
testModuleTunnel.java.srcDirs += 'src/test-core/kotlin'
testModuleTunnel.java.srcDirs += 'src/test-tunnel/kotlin'

moduleG11n.java.srcDirs += 'src/core/kotlin'
moduleG11n.java.srcDirs += 'src/g11n/kotlin'
testModuleG11n.java.srcDirs += 'src/test-core/kotlin'
testModuleG11n.java.srcDirs += 'src/test-g11n/kotlin'

moduleLegacy.java.srcDirs += 'src/core/kotlin'
moduleLegacy.java.srcDirs += 'src/tunnel/kotlin'
moduleLegacy.java.srcDirs += 'src/legacy/kotlin'
moduleLegacy.res.srcDirs += 'src/legacy/res'
testModuleLegacy.java.srcDirs += 'src/test-core/kotlin'
testModuleLegacy.java.srcDirs += 'src/test-tunnel/kotlin'
testModuleLegacy.java.srcDirs += 'src/test-legacy/kotlin'

// Flavors put together modules and flavor config
adblockerHome.manifest.srcFile 'src/legacy/AndroidManifest.xml'
adblockerHome.java.srcDirs += 'src/core/kotlin'
adblockerHome.java.srcDirs += 'src/tunnel/kotlin'
adblockerHome.java.srcDirs += 'src/g11n/kotlin'
adblockerHome.java.srcDirs += 'src/legacy/kotlin'
adblockerHome.java.srcDirs += 'src/flavor-adblocker/kotlin'
adblockerHome.res.srcDirs += 'src/legacy/res'
adblockerHome.res.srcDirs += 'src/flavor-adblocker/res'
testAdblockerHome.java.srcDirs += 'src/test-core/kotlin'
testAdblockerHome.java.srcDirs += 'src/test-tunnel/kotlin'
testAdblockerHome.java.srcDirs += 'src/test-g11n/kotlin'

adblockerFdroid.java.srcDirs += 'src/core/kotlin'
adblockerFdroid.java.srcDirs += 'src/flavor-adblocker/kotlin'
adblockerFdroid.res.srcDirs += 'src/flavor-adblocker/res'
dnsHome.java.srcDirs += 'src/core/kotlin'
dnsHome.java.srcDirs += 'src/flavor-dns/kotlin'
dnsHome.res.srcDirs += 'src/flavor-dns/res'

// Build types are cross combined with flavors to make a final release
debug.java.srcDirs += 'src/build-unofficial/kotlin'
release.java.srcDirs += 'src/build-official/kotlin'
release.res.srcDirs += 'src/build-official/res'
release.java.srcDirs += 'src/build-official-imports/kotlin'
official.java.srcDirs += 'src/build-official/kotlin'
official.res.srcDirs += 'src/build-official/res'
official.java.srcDirs += 'src/build-official-imports/kotlin'
beta.java.srcDirs += 'src/build-official/kotlin'
beta.res.srcDirs += 'src/build-official/res'
beta.java.srcDirs += 'src/build-official-imports/kotlin'
}
signingConfigs {
release {
@@ -105,6 +142,10 @@ android {
dnsHome {
applicationId "org.blokada.alarm.dnschanger"
}
moduleCore {}
moduleTunnel {}
moduleG11n {}
moduleLegacy {}
}
}

@@ -121,6 +162,7 @@ dependencies {
implementation 'nl.komponents.kovenant:kovenant-android:3.3.0'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.23.1"
implementation 'io.paperdb:paperdb:2.6'
implementation 'com.github.michaelbull:kotlin-result:1.0.8'

// Proxy
implementation 'org.pcap4j:pcap4j-core:1.7.0'

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 4be792f

Please sign in to comment.