Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

A rule-based tunnel in Go. This module is wrapper for clash

License

Notifications You must be signed in to change notification settings

AzurLab/ClashForMagiskMod

 
 

Repository files navigation

Clash for Magisk

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.txt to preserve the information and need preserved manually.

Requirements

  • arm64 ABI

License

See also NOTICE and 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 RUNNING or STOPPED
  • 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 stopped
  • STOP - Stop clash if running
  • RESTART - 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

  1. Create directory with mode name

  2. Create script on-start.sh and on-stop.sh

    Example for thus script link

  3. Change mode in starter.yaml

Build

  1. Install JDK, Android SDK, Android NDK, Go, Git

  2. Clone repo

    git clone https://github.com/Kr328/ClashForMagisk && cd ClashForMagisk
  3. Initialize git submodule

    git submodule init
    git submodule upate
  4. Create local.properties on project root directory

    sdk.dir=/path/to/android-sdk
    ndk.dir=/path/to/android-ndk
  5. Run command

    ./gradlew build
  6. Get clash-for-magisk.zip on module/build/outputs

About

A rule-based tunnel in Go. This module is wrapper for clash

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 44.6%
  • Shell 36.2%
  • Kotlin 15.5%
  • C 2.9%
  • CMake 0.8%