From 3dbfc380a5c32aaeb661063ae75f78a328363a2e Mon Sep 17 00:00:00 2001 From: free will <2647778488@qq.com> Date: Fri, 18 Jun 2021 14:12:37 +0800 Subject: [PATCH] init project --- .gitignore | 18 ++ README.md | 29 +++ app/.gitignore | 1 + app/build.gradle | 36 ++++ app/proguard-rules.pro | 21 +++ .../ExampleInstrumentedTest.java | 26 +++ app/src/main/AndroidManifest.xml | 8 + app/src/main/res/values/colors.xml | 10 + app/src/main/res/values/strings.xml | 3 + app/src/main/res/values/themes.xml | 4 + .../pkusz/min_vpn_client/ExampleUnitTest.java | 17 ++ build.gradle | 25 +++ gradle.properties | 17 ++ gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 54329 bytes gradle/wrapper/gradle-wrapper.properties | 6 + gradlew | 172 ++++++++++++++++++ gradlew.bat | 84 +++++++++ settings.gradle | 2 + 18 files changed, 479 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 app/.gitignore create mode 100644 app/build.gradle create mode 100644 app/proguard-rules.pro create mode 100644 app/src/androidTest/java/com/pkusz/min_vpn_client/ExampleInstrumentedTest.java create mode 100644 app/src/main/AndroidManifest.xml create mode 100644 app/src/main/res/values/colors.xml create mode 100644 app/src/main/res/values/strings.xml create mode 100644 app/src/main/res/values/themes.xml create mode 100644 app/src/test/java/com/pkusz/min_vpn_client/ExampleUnitTest.java create mode 100644 build.gradle create mode 100644 gradle.properties create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100644 gradlew create mode 100644 gradlew.bat create mode 100644 settings.gradle diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..66824cd --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +*.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 + +.idea/ +.git/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..86b7e12 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# MIN-VPN-Client + +## 项目开发背景说明 + 本项目前身是MIN-VPN-Android的V2master分支。 + 旧项目地址:https://gitea.qjm253.cn/PKUSZ-future-network-lab/MIN-VPN-Android + + 本项目所作修改有: + 1. 将原有jNDN库替换为min-dev-java(项目地址:https://gitea.qjm253.cn/wefree/min-dev-java)。 + 2. 将除第三方库之外的代码中的主要语言由kotlin&java替换为全java。 + 3. 按照min-dev-java修改收发包逻辑,使得新版VPN-Client可以以MIN的方式与后台进行数据收发。 + 4. 修改vpn数据交互协议逻辑,使得新版VPN-Client可与VPN-Server-Go后台进行正常服务接口交互。 + 5. 优化界面、去除冗余代码、统一及规范项目代码结构。 + + 本项目所提供的服务: + 作为VPN-Server-Go给安卓系统提供访问内网的VPN服务。 + +## 相关项目地址 + MIN-VPN-Android: https://gitea.qjm253.cn/PKUSZ-future-network-lab/MIN-VPN-Android + min-dev-java: https://gitea.qjm253.cn/wefree/min-dev-java + VPN-Server-Go: https://gitea.qjm253.cn/PKUSZ-future-network-lab/minVpnServer-go + MIN-VPN-CLI-core-go: https://gitea.qjm253.cn/PKUSZ-future-network-lab/MIN-VPN-CLI-core-go + +## 开发环境 + jdk版本: 1.8 + Android API Platform: 29 + Gradle版本: 6.7.1 + +## 使用说明 + 导出APK,安装到安卓手机,即可使用 diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..5184e8e --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,36 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.3" + + defaultConfig { + applicationId "com.pkusz.min_vpn_client" + minSdkVersion 24 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + lintOptions { + disable('AllowBackup', 'GoogleAppIndexingWarning', 'MissingApplicationIcon') + } +} + +dependencies { + + testImplementation 'junit:junit:4.+' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + compileOnly 'com.google.android.things:androidthings:1.0' +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/app/proguard-rules.pro @@ -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 \ No newline at end of file diff --git a/app/src/androidTest/java/com/pkusz/min_vpn_client/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/pkusz/min_vpn_client/ExampleInstrumentedTest.java new file mode 100644 index 0000000..5aae215 --- /dev/null +++ b/app/src/androidTest/java/com/pkusz/min_vpn_client/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.pkusz.min_vpn_client; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.pkusz.min_vpn_client", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..de96ad8 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..f8c6127 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..44acd53 --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + MIN-VPN-Client_V2 + \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml new file mode 100644 index 0000000..0b4cfc4 --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,4 @@ + + +