Move to Box_For_Magisk https://github.com/taamarin/box_for_magisk
A fork of ClashForMagisk
This is a Clash module for Magisk, and includes binaries for arm, arm64, x86, x64.
You can download the release installer zip file and install it via the Magisk Manager App.
- Clash config files
/data/clash/*
- config.yaml
/data/clash/config.yaml
- template
/data/clash/template
- config.yaml and template will be merged
/data/clash/run/config.yaml
- 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).
MODDIR= "/data/clash"
-
Clash uses
TPROXY
transparent proxyTCP + UDP
by default, if it detects that the device does not supportTPROXY
, it will automatically useREDIRECT
to proxy onlyTCP
-
Open
${MODDIR}/scripts/clash.config
file line 14-15, modify the value ofnetwork_mode
toTCP
orMIXED
to useREDIRECT
to proxyTCP
, andUDP
will not be proxied whenTUN
is not enabled in the Clash kernel
Clash default transparent proxy local and hotspot, line 17-21
-
Open the
${MODDIR}/scripts/clash.config
file, modify theignore_out_list
array and add thewlan+
element, the transparent proxy willbypass
theWLAN
, and the hotspot will not be affected -
Open the
${MODDIR}/scripts/clash.config
file, modify the ap_list array and delete thewlan+
element to opaque proxyWLAN
and hotspot (theMediaTek
model may beap+
instead ofwlan+
)
-
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 11-12
-
blacklist
&whitelits
, not working onfake-ip
- dns: - enable: true - enhanced-mode: redir-host
-
clash service script is
${MODDIR}/scripts/clash.service.
- Start service :
${MODDIR}/scripts/clash.service -s
- Stop service :
${MODDIR}/scripts/clash.service -k
-
clash proxy script is
${MODDIR}/scripts/clash.iptables.
- Start service :
${MODDIR}/scripts/clash.iptables -s
- Stop service :
${MODDIR}/scripts/clash.iptables -k
you can use SubScription
- open
/data/clash/clash.config
line 29-34- update_interval="interval contab"
- Subcript_url="your_link"
- auto_updateSubcript="true"
Running manual command
${MODDIR}/scripts/clash.tool -s
- clash.config line 36-37, If true,
- use it to download the subscription configuration, when starting Clash , So no need to type
${MODDIR}/scripts/clash.tool -s
anymore
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 79-103
${MODDIR}/scripts/clash.tool -k
- settings are in clash.config line 105-116
- if true, will be updated every day at 00.00
- you can change the URL
- 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 Tap Here
This is a repo fork