———————————
d:
~改名!ShellClash成为过去时!
~执行命令改为crash(覆盖安装则兼容clash命令)
~优化数据库下载逻辑,独立显示版本号
~定时任务增加更多功能
~增加推荐任务(任务菜单及新手引导)
~每10分钟保存面板配置及自动同步ntp时间功能移至推荐任务
~增加自动下载数据库功能
~自动更新相关任务支持版本校验
~增加更细化的任务执行日志
~修复meta内核因内存不足导致无法更新的bug
~修复部分定时任务会每分钟执行一次的bug
b:
~修复定时任务相关bug
a:
~同步最新版本Meta1.17.0内核
~重写定时任务功能
  ·增加更多任务
  ·增加自动任务执行条件
  ·增加更多定时时间条件
  ·增加任务日志及日志推送
  ·优化管理脚本
  ·优化自定义命令功能
~iptables增加对tcp53端口的dns劫持
~部分提示及描述优化
~修复nft模式本机代理语句报错的bug
~修复服务启动前会执行两次启动检查的bug
~修复自定义规则无法删除旧规则的bug
~修复节点绕过功能未添加no-resolve参数的bug
This commit is contained in:
juewuy
2024-01-02 17:09:11 +08:00
parent 1381172d9f
commit 74bfde8eb1
27 changed files with 984 additions and 593 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright (C) Juewuy
clashdir="$(uci get firewall.ShellClash.path | sed 's/\/misnap_init.sh//')"
CRASHDIR="$(uci get firewall.ShellClash.path | sed 's/\/misnap_init.sh//')"
profile=/etc/profile
autoSSH(){
@@ -13,7 +13,7 @@ autoSSH(){
[ -z "$(pidof dropbear)" -o -z "$(netstat -ntul | grep :22)" ] && {
sed -i 's/channel=.*/channel="debug"/g' /etc/init.d/dropbear
/etc/init.d/dropbear restart
mi_autoSSH_pwd=$(grep 'mi_autoSSH_pwd=' $clashdir/mark | awk -F "=" '{print $2}')
mi_autoSSH_pwd=$(grep 'mi_autoSSH_pwd=' $CRASHDIR/configs/ShellCrash.cfg | awk -F "=" '{print $2}')
[ -n "$mi_autoSSH_pwd" ] && echo -e "$mi_autoSSH_pwd\n$mi_autoSSH_pwd" | passwd root
}
#配置nvram
@@ -21,8 +21,8 @@ autoSSH(){
[ "$(nvram get telnet_en)" = 0 ] && nvram set telnet_en=1
nvram commit &> /dev/null
#备份还原SSH秘钥
[ -f $clashdir/configs/dropbear_rsa_host_key ] && ln -sf $clashdir/configs/dropbear_rsa_host_key /etc/dropbear/dropbear_rsa_host_key
[ -f $clashdir/configs/authorized_keys ] && ln -sf $clashdir/configs/authorized_keys /etc/dropbear/authorized_keys
[ -f $CRASHDIR/configs/dropbear_rsa_host_key ] && ln -sf $CRASHDIR/configs/dropbear_rsa_host_key /etc/dropbear/dropbear_rsa_host_key
[ -f $CRASHDIR/configs/authorized_keys ] && ln -sf $CRASHDIR/configs/authorized_keys /etc/dropbear/authorized_keys
#自动清理升级备份文件夹
rm -rf /data/etc_bak
}
@@ -34,7 +34,7 @@ tunfix(){
mkdir -p /tmp/overlay/work
mount -o noatime,lowerdir=${ko_dir},upperdir=/tmp/overlay/upper,workdir=/tmp/overlay/work -t overlay "overlay_mods_only" ${ko_dir}
#将tun.ko链接到lib
ln -sf $clashdir/tools/tun.ko ${ko_dir}/tun.ko
ln -sf $CRASHDIR/tools/tun.ko ${ko_dir}/tun.ko
}
tproxyfix(){
sed -i 's/sysctl -w net.bridge.bridge-nf-call-ip/#sysctl -w net.bridge.bridge-nf-call-ip/g' /etc/init.d/qca-nss-ecm
@@ -51,20 +51,20 @@ init(){
done
#初始化环境变量
sed -i "/alias clash/d" $profile
sed -i "/export clashdir/d" $profile
echo "alias clash=\"$clashdir/clash.sh\"" >>$profile
echo "export clashdir=\"$clashdir\"" >>$profile
sed -i "/export CRASHDIR/d" $profile
echo "alias clash=\"$CRASHDIR/clash.sh\"" >>$profile
echo "export CRASHDIR=\"$CRASHDIR\"" >>$profile
#软固化功能
autoSSH
#设置init.d服务
cp -f $clashdir/clashservice /etc/init.d/clash
cp -f $CRASHDIR/clashservice /etc/init.d/clash
chmod 755 /etc/init.d/clash
#启动服务
if [ ! -f $clashdir/.dis_startup ]; then
if [ ! -f $CRASHDIR/.dis_startup ]; then
#AX6S/AX6000修复tun功能
[ -f $clashdir/configs/tun.ko ] && tunfix
[ -f $CRASHDIR/configs/tun.ko ] && tunfix
#小米7000/小米万兆修复tproxy
[ -f /etc/init.d/qca-nss-ecm ] && [ -n "$(grep 'redir_mod=Tproxy' $clashdir/configs/ShellClash.cfg )" ] && tproxyfix
[ -f /etc/init.d/qca-nss-ecm ] && [ -n "$(grep 'redir_mod=Tproxy' $CRASHDIR/configs/ShellClash.cfg )" ] && tproxyfix
#启动服务
/etc/init.d/clash start
/etc/init.d/clash enable