Skip to content

Asterisk4Magisk/AsteriskMETA

Repository files navigation

English | 简体中文

AsteriskMETA

An Android Mihomo GUI client powered by Mihomo, CMFA Mihomo wrapper, and hev-socks5-tunnel.

Telegram Channel

Asterisk4Magisk

Features

  • VPN Service, TPROXY(ROOT), TUN(ROOT), and TUN2SOCKS(ROOT) run modes
  • Add configurations from QR code, local file, or URL subscription
  • JavaScript override scripts for advanced configuration mutation
  • ROOT start-on-boot script generation through Magisk service.d
  • MIUIX Compose UI

Screenshots

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4

Run Modes

VPN Service

  • Works without root permission.
  • Uses Android VpnService.
  • Uses the CMFA bridge module to run Mihomo in the app process.
  • Suitable for normal Android app-level VPN usage.

TPROXY(ROOT)

  • Requires root permission.
  • Runs the local Mihomo executable directly with libsu.
  • Uses iptables and policy routing for transparent proxy traffic.
  • Uses the configured transparent proxy port as the Mihomo inbound.

TUN(ROOT)

  • Requires root permission.
  • Runs the local Mihomo executable directly with libsu.
  • Uses Mihomo's TUN listener to create the fixed TUN device asterisk0.
  • Keeps Mihomo auto-route disabled and applies app-managed iptables and policy routing rules.
  • Defaults to the gVisor TUN stack for compatibility; users can switch to another Mihomo TUN stack in settings.

TUN2SOCKS(ROOT)

  • Requires root permission.
  • Runs the local Mihomo executable directly with libsu.
  • Uses hev-socks5-tunnel to create the fixed TUN device asterisk0.
  • Uses Mihomo's local SOCKS5 inbound as the tunnel target.
  • Shares most ROOT routing and app proxy behavior with TPROXY, but routes traffic through the TUN device instead of Mihomo's TPROXY inbound.

Resource Files

  • Runtime files are stored in the app private files/clash directory, commonly /data/user/0/org.asterisk.zcc.ameta/files/clash.
  • The bundled Mihomo executable is restored from native libraries and can be replaced manually with an mihomo executable file.
  • Custom resource files can be added, replaced manually, or updated from their configured URLs.

Development

Initialize submodules before building:

git submodule update --init --recursive

Open the project root in Android Studio, or build it with Gradle wrapper:

.\gradlew.bat assembleDebug

On macOS or Linux:

./gradlew assembleDebug

The build:

  • uses Android SDK and NDK
  • prepares bundled Mihomo and hev-socks5-tunnel native runtime files
  • checks out the Mihomo submodule to ProjectConfig.MIHOMO_CORE_VERSION before CMFA JNI builds
  • builds the vendored CMFA Go core
  • builds the native setuidgid helper
  • produces ABI split APKs for arm64-v8a, armeabi-v7a, x86, x86_64, plus a universal APK

If Gradle cannot find Android NDK, set ndk.dir in local.properties, set ANDROID_NDK_HOME, or install an NDK under the Android SDK.

WSA

For WSA, VPN permission can be granted with:

appops set org.asterisk.zcc.ameta ACTIVATE_VPN allow

License

GPL-3.0

Credits

About

A Mihomo GUI client for Android, support VPN Service, TPROXY(ROOT), TUN(ROOT) and TUN2SOCKS(ROOT)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors