-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "app/libs/tun2socks"] | ||
path = app/libs/tun2socks | ||
url = https://github.com/dovecoteescapee/tun2socks.git | ||
[submodule "app/src/main/cpp/byedpi"] | ||
path = app/src/main/cpp/byedpi | ||
url = https://github.com/hufrea/byedpi.git |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# ByeDPI for Android | ||
|
||
Application for Android that start a local VPN service to bypass DPI (Deep Packet Inspection) and unblock the internet. | ||
|
||
## Features | ||
|
||
See [ByeDPI description](https://github.com/hufrea/byedpi/readme.txt). | ||
|
||
## Dependencies | ||
|
||
- [ByeDPI](https://github.com/hufrea/byedpi) | ||
- [Tun2Socks](https://github.com/dovecoteescapee/tun2socks) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/build | ||
*.aar | ||
*.jar |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile | ||
|
||
plugins { | ||
id("com.android.application") | ||
id("org.jetbrains.kotlin.android") | ||
} | ||
|
||
android { | ||
namespace = "io.github.dovecoteescapee.byedpi" | ||
compileSdk = 34 | ||
|
||
defaultConfig { | ||
applicationId = "io.github.dovecoteescapee.byedpi" | ||
minSdk = 24 | ||
targetSdk = 34 | ||
versionCode = 1 | ||
versionName = "0.1.0-alpha" | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
externalNativeBuild { | ||
cmake { | ||
path = file("src/main/cpp/CMakeLists.txt") | ||
version = "3.22.1" | ||
} | ||
} | ||
buildFeatures { | ||
viewBinding = true | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(files("libs/tun2socks.aar")) | ||
|
||
implementation("androidx.fragment:fragment-ktx:1.6.2") | ||
implementation("androidx.core:core-ktx:1.12.0") | ||
implementation("androidx.appcompat:appcompat:1.6.1") | ||
implementation("androidx.preference:preference-ktx:1.2.1") | ||
implementation("com.takisoft.preferencex:preferencex:1.1.0") | ||
implementation("com.google.android.material:material:1.11.0") | ||
implementation("androidx.constraintlayout:constraintlayout:2.1.4") | ||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0") | ||
implementation("androidx.lifecycle:lifecycle-service:2.7.0") | ||
testImplementation("junit:junit:4.13.2") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.5") | ||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") | ||
} | ||
|
||
abstract class BuildTun2Socks : DefaultTask() { | ||
@TaskAction | ||
fun buildTun2Socks() { | ||
val projectDir = project.projectDir | ||
val tun2socksDir = projectDir.resolve("libs/tun2socks") | ||
val tun2socksOutput = projectDir.resolve("libs/tun2socks.aar") | ||
|
||
if (tun2socksOutput.exists()) { | ||
return | ||
} | ||
project.exec { | ||
workingDir = tun2socksDir | ||
commandLine("gomobile", "bind", "-o", tun2socksOutput, "./engine") | ||
} | ||
} | ||
} | ||
|
||
tasks.register<BuildTun2Socks>("buildTun2Socks") { | ||
group = "build" | ||
description = "Build tun2socks" | ||
} | ||
|
||
tasks.withType(KotlinCompile::class).configureEach { | ||
dependsOn("buildTun2Socks") | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"version": 3, | ||
"artifactType": { | ||
"type": "APK", | ||
"kind": "Directory" | ||
}, | ||
"applicationId": "io.github.dovecoteescapee.byedpi", | ||
"variantName": "release", | ||
"elements": [ | ||
{ | ||
"type": "SINGLE", | ||
"filters": [], | ||
"attributes": [], | ||
"versionCode": 1, | ||
"versionName": "0.1.0-alpha", | ||
"outputFile": "app-release.apk" | ||
} | ||
], | ||
"elementType": "File" | ||
} |