diff --git a/app_mieru/build.gradle.kts b/app_mieru/build.gradle.kts
new file mode 100644
index 0000000..e22fe25
--- /dev/null
+++ b/app_mieru/build.gradle.kts
@@ -0,0 +1,18 @@
+plugins {
+ id("com.android.application")
+ id("org.jetbrains.kotlin.android")
+}
+
+setupAll()
+
+android {
+ defaultConfig {
+ applicationId = "moe.matsuri.exe.mieru"
+ versionCode = 1
+ versionName = "2.2.0"
+ splits.abi {
+ reset()
+ include("arm64-v8a", "x86_64")
+ }
+ }
+}
diff --git a/app_mieru/src/main/AndroidManifest.xml b/app_mieru/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..b6827b2
--- /dev/null
+++ b/app_mieru/src/main/AndroidManifest.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app_mieru/src/main/java/moe/matsuri/exe/mieru/BinaryProvider.kt b/app_mieru/src/main/java/moe/matsuri/exe/mieru/BinaryProvider.kt
new file mode 100644
index 0000000..571bb19
--- /dev/null
+++ b/app_mieru/src/main/java/moe/matsuri/exe/mieru/BinaryProvider.kt
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * Copyright (C) 2022 by nekohasekai *
+ * *
+ * This program is free software: you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation, either version 3 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program. If not, see . *
+ * *
+ ******************************************************************************/
+
+package moe.matsuri.exe.mieru
+
+import android.net.Uri
+import android.os.ParcelFileDescriptor
+import io.nekohasekai.sagernet.plugin.NativePluginProvider
+import io.nekohasekai.sagernet.plugin.PathProvider
+import java.io.File
+import java.io.FileNotFoundException
+
+class BinaryProvider : NativePluginProvider() {
+ override fun populateFiles(provider: PathProvider) {
+ provider.addPath("mieru-plugin", 0b111101101)
+ }
+
+ override fun getExecutable() = context!!.applicationInfo.nativeLibraryDir + "/libmieru.so"
+ override fun openFile(uri: Uri): ParcelFileDescriptor = when (uri.path) {
+ "/mieru-plugin" -> ParcelFileDescriptor.open(
+ File(getExecutable()),
+ ParcelFileDescriptor.MODE_READ_ONLY
+ )
+ else -> throw FileNotFoundException()
+ }
+}
diff --git a/app_mieru/src/main/res/drawable/ic_launcher_foreground.xml b/app_mieru/src/main/res/drawable/ic_launcher_foreground.xml
new file mode 100644
index 0000000..5c07d96
--- /dev/null
+++ b/app_mieru/src/main/res/drawable/ic_launcher_foreground.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app_mieru/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app_mieru/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..0648fb4
--- /dev/null
+++ b/app_mieru/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app_mieru/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app_mieru/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..d863eb7
--- /dev/null
+++ b/app_mieru/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app_mieru/src/main/res/mipmap-hdpi/ic_launcher.png b/app_mieru/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..c09f9d2
Binary files /dev/null and b/app_mieru/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app_mieru/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app_mieru/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..bbfa679
Binary files /dev/null and b/app_mieru/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/app_mieru/src/main/res/mipmap-mdpi/ic_launcher.png b/app_mieru/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..979ab2c
Binary files /dev/null and b/app_mieru/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app_mieru/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app_mieru/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..4175602
Binary files /dev/null and b/app_mieru/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/app_mieru/src/main/res/mipmap-xhdpi/ic_launcher.png b/app_mieru/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..85aae6a
Binary files /dev/null and b/app_mieru/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app_mieru/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app_mieru/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..b139db6
Binary files /dev/null and b/app_mieru/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/app_mieru/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app_mieru/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..804562e
Binary files /dev/null and b/app_mieru/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app_mieru/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app_mieru/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..72026b8
Binary files /dev/null and b/app_mieru/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/app_mieru/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app_mieru/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..0dc9138
Binary files /dev/null and b/app_mieru/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app_mieru/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app_mieru/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..027d980
Binary files /dev/null and b/app_mieru/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/app_mieru/src/main/res/values/ic_launcher_background.xml b/app_mieru/src/main/res/values/ic_launcher_background.xml
new file mode 100644
index 0000000..c58f6bc
--- /dev/null
+++ b/app_mieru/src/main/res/values/ic_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #E91E63
+
\ No newline at end of file
diff --git a/download.sh b/download.sh
index 4e0db62..b6418c3 100755
--- a/download.sh
+++ b/download.sh
@@ -38,6 +38,15 @@ unzip_naive() {
rm -rf tmp*
}
+unzip_mieru() {
+ rm -rf tmp
+ mkdir -p tmp
+ tar -xf tmp.tar.gz -C tmp
+
+ mv tmp/mieru "$1"/libmieru.so
+ rm -rf tmp*
+}
+
download_xray() {
VERSION="v1.7.5"
mkdir_libs "app_xray/libs"
@@ -119,4 +128,15 @@ download_naive() {
unzip_naive x86_64
}
+download_mieru() {
+ TAG="v2.2.0"
+ VERSION="2.2.0"
+ mkdir_libs "app_mieru/libs"
+
+ curl -Lso tmp.tar.gz "https://github.com/enfein/mieru/releases/download/${TAG}/mieru_${VERSION}_android_arm64.tar.gz"
+ unzip_mieru arm64-v8a
+ curl -Lso tmp.tar.gz "https://github.com/enfein/mieru/releases/download/${TAG}/mieru_${VERSION}_android_amd64.tar.gz"
+ unzip_mieru x86_64
+}
+
download_"$1"
diff --git a/js/make.sh b/js/make.sh
index 967f4ff..9cba248 100755
--- a/js/make.sh
+++ b/js/make.sh
@@ -5,6 +5,7 @@ set -e
[ $1 == "tuic" ] && exit
[ $1 == "tuic5" ] && exit
[ $1 == "naive" ] && exit
+[ $1 == "mieru" ] && exit
HTML=../app_$1/html
SRC=./plugin_$1
diff --git a/settings.gradle b/settings.gradle
index 4c54900..f9b5804 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -17,4 +17,5 @@ include ':app_hysteria'
include ':app_tuic'
include ':app_tuic5'
include ':app_juicity'
-include ':app_naive'
\ No newline at end of file
+include ':app_naive'
+include ':app_mieru'