From e2e32eaa407348c88458650575f41407695430df Mon Sep 17 00:00:00 2001 From: juewuy Date: Tue, 2 Dec 2025 15:07:11 +0800 Subject: [PATCH] =?UTF-8?q?~=E7=BB=9F=E4=B8=80mihomo=E5=92=8Csingbox?= =?UTF-8?q?=E5=86=85=E6=A0=B8fake-ip=E7=BD=91=E6=AE=B5=20~=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=96=B0=E6=89=8B=E5=BC=95=E5=AF=BC=20~=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=83=A8=E5=88=86=E8=AE=BE=E5=A4=87=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=90=8E=E6=B2=A1=E6=9C=89=E8=87=AA=E5=8A=A8=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E9=98=B2=E7=81=AB=E5=A2=99=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E7=9A=84bug=20~=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=B7=A5=E5=85=B7=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/init.sh | 2 +- scripts/menu.sh | 6 +++--- scripts/start.sh | 5 +++-- scripts/task.sh | 6 +++--- scripts/webget.sh | 3 ++- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/scripts/init.sh b/scripts/init.sh index cbe38fb..5fe5f78 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -226,7 +226,7 @@ fi setconfig COMMAND "$COMMAND" ${CRASHDIR}/configs/command.env #设置防火墙执行模式 grep -q 'firewall_mod' "$CRASHDIR/configs/ShellClash.cfg" 2>/dev/null || { - iptables -j REDIRECT -h >/dev/null 2>&1 && firewall_mod=iptables + firewall_mod=iptables nft add table inet shellcrash 2>/dev/null && firewall_mod=nftables setconfig firewall_mod $firewall_mod } diff --git a/scripts/menu.sh b/scripts/menu.sh index 960f6be..b646aa1 100644 --- a/scripts/menu.sh +++ b/scripts/menu.sh @@ -1990,9 +1990,9 @@ tools() { echo -e " 3 \033[36m日志及推送工具\033[0m" [ -f /etc/firewall.user ] && echo -e " 4 \033[32m配置\033[0m外网访问SSH" [ -x /usr/sbin/otapredownload ] && echo -e " 5 \033[33m$mi_update\033[0m小米系统自动更新" - [ -f ${CRASHDIR}/misnap_init.sh ] && echo -e " 6 小米设备软固化SSH ———— \033[$mi_autoSSH_type \033[0m" + [ "$systype" = "mi_snapshot" ] && echo -e " 6 小米设备软固化SSH ———— \033[$mi_autoSSH_type \033[0m" [ -f /etc/config/ddns ] && echo -e " 7 配置\033[32mDDNS服务\033[0m(需下载相关脚本)" - [ -f ${CRASHDIR}/misnap_init.sh ] && echo -e " 8 小米设备Tun模块修复 ———— \033[$mi_tunfix \033[0m" + [ "$systype" = "mi_snapshot" ] && echo -e " 8 小米设备Tun模块修复 ———— \033[$mi_tunfix \033[0m" echo ----------------------------------------------- echo -e " 0 返回上级菜单" echo ----------------------------------------------- @@ -2063,7 +2063,7 @@ tools() { rm -rf ${CRASHDIR}/tools/tun.ko echo -e "\033[33m补丁文件已移除,请立即重启设备以防止出错!\033[0m" } - elif [ -z "$(modinfo tun)" ]; then + elif ckcmd modinfo && [ -z "$(modinfo tun)" ]; then echo -e "\033[33m本功能需要修改系统文件,不保证没有任何风险!\033[0m" echo -e "\033[33m本功能采集的Tun模块并不一定适用于你的设备!\033[0m" sleep 1 diff --git a/scripts/start.sh b/scripts/start.sh index 4339fd3..a97bc69 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -410,6 +410,7 @@ dns: - 223.5.5.5 enhanced-mode: fake-ip fake-ip-range: 28.0.0.1/8 + fake-ip-range6: fc00::/16 fake-ip-filter: EOF if [ "$dns_mod" != "redir_host" ]; then @@ -710,8 +711,8 @@ EOF { "tag": "dns_fakeip", "type": "fakeip", - "inet4_range": "198.18.0.0/15", - "inet6_range": "fc00::/18" + "inet4_range": "28.0.0.1/8", + "inet6_range": "fc00::/16" }, { diff --git a/scripts/task.sh b/scripts/task.sh index cb7dcbd..b8a6c93 100644 --- a/scripts/task.sh +++ b/scripts/task.sh @@ -491,14 +491,14 @@ task_recom(){ #任务推荐 echo ----------------------------------------------- echo -e "每隔10分钟自动保存面板配置" echo -e "服务启动后自动同步ntp时间" - echo -e "在每周3的3点整更新订阅并重启服务" + echo -e "在每日的3点0分重启服务" echo ----------------------------------------------- read -p "是否启用?(1/0) > " res [ "$res" = 1 ] && { set_service running "106" "运行时每10分钟自动保存面板配置" "*/10 * * * *" set_service afstart "107" "服务启动后自动同步ntp时间" - cronset "在每周3的3点整更新订阅并重启服务" "0 3 * * 3 ${CRASHDIR}/task/task.sh 104 在每周3的3点整更新订阅并重启服务" && \ - echo -e "任务【在每周3的3点整更新订阅并重启服务】\033[32m添加成功!\033[0m" + cronset "在每日的3点0分重启服务" "0 3 * * * ${CRASHDIR}/task/task.sh 103 在每日的3点0分重启服务" && \ + echo -e "任务【在每日的3点0分重启服务】\033[32m添加成功!\033[0m" } } task_menu(){ #任务菜单 diff --git a/scripts/webget.sh b/scripts/webget.sh index 6526517..e301181 100644 --- a/scripts/webget.sh +++ b/scripts/webget.sh @@ -2252,9 +2252,10 @@ userguide(){ else redir_mod="Redir模式" fi - setconfig crashcore "clash" } + setconfig crashcore "mihomo" setconfig redir_mod "$redir_mod" + setconfig dns_mod mix #默认启用绕过CN-IP setconfig cn_ip_route 已开启 #自动识别IPV6