From 497bdfed3c912c16851d5b19aa399f55f3bc2019 Mon Sep 17 00:00:00 2001 From: juewuy Date: Tue, 3 May 2022 22:56:16 +0800 Subject: [PATCH] =?UTF-8?q?v1.5.9=20~=E5=90=8C=E6=AD=A5=E6=9C=80=E6=96=B0a?= =?UTF-8?q?lpha=E7=89=88=E6=9C=ACmeta=E5=86=85=E6=A0=B8=20~=E4=BF=AE?= =?UTF-8?q?=E5=A4=8DTun=E6=A8=A1=E5=BC=8F=20~=E4=BF=AE=E5=A4=8DMeta?= =?UTF-8?q?=E5=86=85=E6=A0=B8=E6=B7=B7=E5=90=88=E6=A8=A1=E5=BC=8F=20~?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=81=E5=AA=92=E4=BD=93=E9=A2=84=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E6=89=93=E4=B8=8D=E5=BC=80=E7=9A=84bug=20~=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=90=84=E7=A7=8DDNS=E5=BC=82=E5=B8=B8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/start.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index c47fa02..2c3556d 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -594,6 +594,14 @@ start_output(){ fi iptables -t nat -A OUTPUT -p udp --dport 53 -j clash_dns_out } +start_tun(){ + iptables -I FORWARD -o utun -j ACCEPT + ip6tables -I FORWARD -o utun -j ACCEPT > /dev/null 2>&1 + if [ "$clashcore" = 'clash.meta' ];then + sleep 3 + ip route add 198.18.0.0/16 dev utun proto kernel scope link src 198.18.0.1 + fi +} stop_iptables(){ host_lan #重置iptables规则 @@ -820,14 +828,10 @@ afstart(){ /etc/init.d/dnsmasq restart >/dev/null 2>&1 fi fi - if [ "$redir_mod" = "Tun模式" -o "$redir_mod" = "混合模式" ];then - ip route add 198.18.0.0/16 dev utun proto kernel scope link src 198.18.0.1 - iptables -I FORWARD -o utun -j ACCEPT - ip6tables -I FORWARD -o utun -j ACCEPT > /dev/null 2>&1 - fi [ "$redir_mod" != "纯净模式" ] && [ "$redir_mod" != "Tun模式" ] && start_redir [ "$redir_mod" = "Redir模式" ] && [ "$tproxy_mod" = "已开启" ] && start_udp [ "$local_proxy" = "已开启" ] && [ "$local_type" = "iptables增强模式" ] && start_output + [ "$redir_mod" = "Tun模式" -o "$redir_mod" = "混合模式" ] && start_tun & #标记启动时间 mark_time #设置本机代理