Skip to content

v4.0.r89.dc635d1

Compare
Choose a tag to compare
@Adlyq Adlyq released this 23 Jan 13:40
· 121 commits to master since this release

见提交
/data/adb/modules/Clash_For_Magisk/scripts移动至/data/clash/scripts
clash.inotify改为:

#!/system/bin/sh
scripts=`realpath $0`
scripts_dir=`dirname ${scripts}`
service_path="${scripts_dir}/clash.service"
tproxy_path="${scripts_dir}/clash.tproxy"
signal_file="${scripts_dir}/../run/cmdRunning"

events=$1
monitor_dir=$2
monitor_file=$3

service_control() {
    if [ "${monitor_file}" = "disable" ] ; then
        touch ${signal_file}  #<<<<<<<<<<<<<<<<<
        if [ "${events}" = "d" ] ; then
            ${service_path} -s && ${tproxy_path} -s
        elif [ "${events}" = "n" ] ; then
            ${service_path} -k && ${tproxy_path} -k
        fi
        rm ${signal_file}  #<<<<<<<<<<<<<<<<<
    fi
}

service_control

/data/adb/modules/Clash_For_Magisk/service.sh改为如下

until [ $(getprop init.svc.bootanim) = "stopped" ] ; do
    sleep 5
done

service_path=`realpath $0`
module_dir=`dirname ${service_path}`
data_dir="/data/clash"  #<<<<<<<<<<<<<<<<<
scripts_dir="${data_dir}/scripts"  #<<<<<<<<<<<<<<<<<
Clash_data_dir="/data/clash"
Clash_run_path="${Clash_data_dir}/run"
Clash_pid_file="${Clash_run_path}/clash.pid"
busybox_path="/data/adb/magisk/busybox"

if [ -f ${Clash_pid_file} ] ; then
    rm -rf ${Clash_pid_file}
fi
rm -rf ${Clash_run_path}/run.logs
nohup ${busybox_path} crond -c ${Clash_run_path} > /dev/null 2>&1 &

${scripts_dir}/clash.service -s && ${scripts_dir}/clash.tproxy -s
inotifyd ${scripts_dir}/clash.inotify ${module_dir} >> /dev/null &  #<<<<<<<<<<<<<<<<<

安装后建议清数据

懒得改可以直接删除/data/clash后安装下方的Magisk模块!面板默认密码:clash