diff --git a/scripts/start.sh b/scripts/start.sh index d8dd643..a0063ab 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -453,7 +453,7 @@ EOF hosts_ip=$(echo $line | awk '{print $1}') && hosts_domain=$(echo $line | awk '{print $2}') && [ -z "$(cat "$TMPDIR"/hosts.yaml | grep -oE "$hosts_domain")" ] && - echo " '$hosts_domain': $hosts_ip" >>"$TMPDIR"/hosts.yaml + echo " '$hosts_domain': $hosts_ip" >>"$TMPDIR"/hosts.yaml done <$sys_hosts fi #分割配置文件 @@ -533,11 +533,11 @@ EOF #mix模式生成rule-providers [ "$dns_mod" = "mix" ] && ! grep -q 'geosite-cn:' "$TMPDIR"/rule-providers.yaml && ! grep -q 'rule-providers' "$CRASHDIR"/yamls/others.yaml 2>/dev/null && \ cat >>"$TMPDIR"/rule-providers.yaml </dev/null 2>&1; then + redir_mod="Tproxy模式" + else + redir_mod="Redir模式" + fi + setconfig crashcore "clash" + } setconfig redir_mod "$redir_mod" - [ -n "$(echo $cputype | grep -E "linux.*mips.*")" ] && setconfig crashcore "clash" + #默认启用绕过CN-IP + setconfig cn_ip_route 已开启 #自动识别IPV6 [ -n "$(ip a 2>&1 | grep -w 'inet6' | grep -E 'global' | sed 's/.*inet6.//g' | sed 's/scope.*$//g')" ] && { setconfig ipv6_redir 已开启 setconfig ipv6_support 已开启 setconfig ipv6_dns 已开启 + setconfig cn_ipv6_route 已开启 } #设置开机启动 [ -f /etc/rc.common -a "$(cat /proc/1/comm)" = "procd" ] && /etc/init.d/shellcrash enable @@ -2262,6 +2272,9 @@ userguide(){ sysctl -w net.ipv4.ip_forward=1 } && echo "已成功开启ipv4转发,如未正常开启,请手动重启设备!" || echo "开启失败!请自行谷歌查找当前设备的开启方法!" fi + #禁止docker启用的net.bridge.bridge-nf-call-iptables + sysctl -w net.bridge.bridge-nf-call-iptables=0 + sysctl -w net.bridge.bridge-nf-call-ip6tables=0 elif [ "$num" = 2 ];then setconfig redir_mod "Redir模式" [ -n "$(echo $cputype | grep -E "linux.*mips.*")" ] && setconfig crashcore "clash"