Clash for Magisk
November 26, 2020 · View on GitHub
A rule-based tunnel in Go. This module is wrapper for clash
Mod
-
Solved the conflicts with Clash for Android by changing clash config directory
-
Replace the Clash core with Clashr -
Update Clash Core, support ssr
-
Restore selectors after clash started automatically, however, need a extra file
selector.txtto preserve the information and need preserved manually.
Requirements
- arm64 ABI
License
Feature
See also https://github.com/Dreamacro/clash
Configure
Data Path {InternalStorage}/Android/data/com.github.kr328.clashm
In data directory
- Clash configure file
config.yaml - Clash GEOIP database
Country.mmdb - Clash starter configure file
starter.yaml[example] - Clash status file
RUNNINGorSTOPPED - Custom proxy mode directory
mode.d
Control
Data Path {InternalStorage}/Android/data/com.github.kr328.clashm
Create the following file to control clash
START- Start clash if stoppedSTOP- Stop clash if runningRESTART- Restart clash
Read logs
-
On PC
Run command
adb logcat -s Clash -
On Android
Run command
logcat -s Clash
Custom Proxy Mode
Custom Mode Directory {InternalStorage}/Android/data/com.github.kr328.clashm/mode.d
-
Create directory with mode name
-
Create script
on-start.shandon-stop.shExample for thus script link
-
Change
modeinstarter.yaml
Build
-
Install JDK, Android SDK, Android NDK, Go, Git
-
Clone repo
git clone https://github.com/Kr328/ClashForMagisk && cd ClashForMagisk -
Initialize git submodule
git submodule init git submodule upate -
Create
local.propertieson project root directorysdk.dir=/path/to/android-sdk ndk.dir=/path/to/android-ndk -
Run command
./gradlew build -
Get clash-for-magisk.zip on module/build/outputs