Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

taamarin/ClashforMagisk

Repository files navigation

Clash for Magisk

Clash
Clash

Proxy Transparan for android.

A fork of ClashForMagisk

This is a Clash module for Magisk, and includes binaries for arm, arm64, x86, x64.

Manager Apps CFM

Install

You can download the release installer zip file and install it via the Magisk Manager App.

Config

  • Clash config files /data/clash/*
  • config.yaml /data/clash/config.yaml
  • template /data/clash/template

temporary config

  • config.yaml and template will be merged /data/clash/run/config.yaml

Usage

Normal usage ( Default and Recommended )

Manage service start / stop
  • Clash service is auto-run after system boot up by default.
  • You can use Magisk Manager App to manage it. Be patient to wait it take effect (about 3 second).

Advanced usage

MODDIR= "/data/clash"

Select which packages to proxy
  • If you expect all Apps proxy by Clash with transparent proxy EXCEPT specific Apps, write down bypass at the first line then these Apps' packages separated as above in file /data/clash/packages.list

  • clash.config line 19

  • blacklist & whitelits, not working on fake-ip

    - dns:
        - enable: true
        - enhanced-mode: redir-host
    
Manage service start / stop
  • clash service script is ${MODDIR}/scripts/clash.service.

    • Start service :

    ${MODDIR}/scripts/clash.service -s

    • Stop service :

    ${MODDIR}/scripts/clash.service -k

Manage transparent proxy enable / disable
  • clash proxy script is ${MODDIR}/scripts/clash.iptables.

    • Start service :

    ${MODDIR}/scripts/clash.iptables -s

    • Stop service :

    ${MODDIR}/scripts/clash.iptables -k

SubScription

you can use SubScription

  • open /data/clash/clash.config line 33 & 31
    • Subcript_url="your_link"
    • auto_updateSubcript="true"

Running manual command

${MODDIR}/scripts/clash.tool -s
Config Online
  • clash.config line 35, If true,
  • use it to download the subscription configuration, when starting Clash , So no need to type ${MODDIR}/scripts/clash.tool -s anymore
Change Clash kernel

You can use Clash.Premium and Clash.Meta

  • Clash Meta
    • /data/clash/kernel/lib/Clash.Meta
  • Clash Premium
    • /data/clash/kernel/lib/Clash.Premium

you can download the Kernel automatically, for the settings in the clash.config line 92

${MODDIR}/scripts/clash.tool -k
GeoSite, GeoIP, and Mmdb
  • settings are in clash.config line 118
  • if true, will be updated every day at 00.00
  • you can change the URL

Uninstall

  • Uninstall the module via Magisk Manager App.
  • You can clean Clash data dir by running command
rm -rf /data/clash && rm -rf /data/adb/service.d/clash_service.sh

Tutorial Clash For Magisk

Tutorial Tap Here

Credits

This is a repo fork