diff --git a/bin/ShellCrash.tar.gz b/bin/ShellCrash.tar.gz index 661b63f..2e86583 100644 Binary files a/bin/ShellCrash.tar.gz and b/bin/ShellCrash.tar.gz differ diff --git a/bin/clashfm.tar.gz b/bin/clashfm.tar.gz index da17b06..bff3264 100644 Binary files a/bin/clashfm.tar.gz and b/bin/clashfm.tar.gz differ diff --git a/bin/public.tar.gz b/bin/public.tar.gz index 82bcb7f..b5716a5 100644 Binary files a/bin/public.tar.gz and b/bin/public.tar.gz differ diff --git a/bin/version b/bin/version index 5e3fc5e..a8bd624 100644 --- a/bin/version +++ b/bin/version @@ -4,5 +4,5 @@ clash_v=v1.7.1 meta_v=v1.18.1 singboxp_v=1.8.5-73d97226 singbox_v=1.8.8 -versionsh=1.9.1alpha7 +versionsh=1.9.1alpha8 GeoIP_v=20240302 diff --git a/scripts/init.sh b/scripts/init.sh index 0ccedd0..c06c627 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) Juewuy -version=1.9.1alpha7 +version=1.9.1alpha8 setdir(){ dir_avail(){ @@ -315,6 +315,7 @@ sed -i "s/ShellClash/ShellCrash/g" $configpath sed -i "s/cpucore=armv8/cpucore=arm64/g" $configpath sed -i "s/redir_mod=Nft基础/redir_mod=Redir模式/g" $configpath sed -i "s/redir_mod=Nft混合/redir_mod=Tproxy模式/g" $configpath +sed -i "s/redir_mod=Tproxy混合/redir_mod=Tproxy模式/g" $configpath sed -i "s/redir_mod=纯净模式/firewall_area=4/g" $configpath echo -e "\033[32m脚本初始化完成,请输入\033[30;47m crash \033[0;33m命令开始使用!\033[0m" diff --git a/scripts/start.sh b/scripts/start.sh index 9c95dde..927f66e 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1038,7 +1038,7 @@ start_iptables(){ #iptables配置总入口 [ "$lan_proxy" = true ] && { [ "$redir_mod" = "Tun模式" -o "$redir_mod" = "混合模式" ] && { iptables -I FORWARD -o utun -j ACCEPT - ip route del 198.18.0.0/16 dev utun proto kernel scope link src 198.18.0.0 #移除内核生成的tun路由 + #ip route show | grep "dev utun proto kernel scope link src" | while read route; do ip route del $route; done #移除内核生成的tun路由 } start_ipt_route iptables mangle PREROUTING shellcrash_mark $protocol } @@ -1114,10 +1114,6 @@ start_nft_route(){ #nftables-route通用工具 #添加通用路由 nft add rule inet shellcrash "$1" "$JUMP" #处理特殊路由 - [ "$redir_mod" = "Tproxy模式" ] && { - nft add chain inet shellcrash ${1}_tproxy { type filter hook $2 priority -100 \; } - nft add rule inet shellcrash ${1}_tproxy meta mark $fwmark meta l4proto {tcp, udp} tproxy to :$tproxy_port - } [ "$redir_mod" = "混合模式" ] && { nft add rule inet shellcrash $1 meta l4proto tcp mark set $((fwmark + 1)) nft add chain inet shellcrash ${1}_mixtcp { type nat hook $2 priority -100 \; } @@ -1182,16 +1178,20 @@ start_nftables(){ #nftables配置总入口 [ "$local_proxy" = true ] && start_nft_route output output nat -100 } [ "$redir_mod" = "Tproxy模式" ] && modprobe nft_tproxy >/dev/null 2>&1 && { - JUMP="meta l4proto {tcp, udp} mark set $fwmark" #跳转劫持的具体命令 + JUMP="meta l4proto {tcp, udp} mark set $fwmark tproxy to :$tproxy_port" #跳转劫持的具体命令 [ "$lan_proxy" = true ] && start_nft_route prerouting prerouting nat -150 - [ "$local_proxy" = true ] && start_nft_route output output route -150 + [ "$local_proxy" = true ] && { + JUMP="meta l4proto {tcp, udp} mark set $fwmark" #跳转劫持的具体命令 + start_nft_route output output route -150 + nft add chain inet shellcrash mark_out { type filter hook prerouting priority -100 \; } + nft add rule inet shellcrash mark_out meta mark $fwmark meta l4proto {tcp, udp} tproxy to :$tproxy_port + } } [ "$tun_statu" = true ] && { [ "$redir_mod" = "Tun模式" ] && JUMP="meta l4proto {tcp, udp} mark set $fwmark" #跳转劫持的具体命令 [ "$redir_mod" = "混合模式" ] && JUMP="meta l4proto udp mark set $fwmark" #跳转劫持的具体命令 [ "$lan_proxy" = true ] && { start_nft_route prerouting prerouting nat -150 - ip route del 198.18.0.0/16 dev utun proto kernel scope link src 198.18.0.0 #移除内核生成的tun路由 #放行流量 nft add chain inet shellcrash forward { type filter hook forward priority -150 \; } nft add rule inet shellcrash forward oifname "utun" accept